Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E08CB431FC3 for ; Mon, 14 Jul 2014 09:02:54 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LnS9JdP8sPjC for ; Mon, 14 Jul 2014 09:02:49 -0700 (PDT) Received: from dmz-mailsec-scanner-1.mit.edu (dmz-mailsec-scanner-1.mit.edu [18.9.25.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 68216431FC7 for ; Mon, 14 Jul 2014 09:02:43 -0700 (PDT) X-AuditID: 1209190c-f79ef6d000005dd6-ca-53c3ff22a164 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id E3.47.24022.22FF3C35; Mon, 14 Jul 2014 12:02:42 -0400 (EDT) Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id s6EG2eWW000842; Mon, 14 Jul 2014 12:02:40 -0400 Received: from drake.dyndns.org (static-155-212-141-65.mas.onecommunications.net [155.212.141.65]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s6EG2Ntb026038 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Mon, 14 Jul 2014 12:02:39 -0400 Received: from amthrax by drake.dyndns.org with local (Exim 4.77) (envelope-from ) id 1X6ihr-0006rE-HE; Mon, 14 Jul 2014 12:02:23 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH 2/2] emacs: Expand default saved searches and add shortcut keys Date: Mon, 14 Jul 2014 12:02:15 -0400 Message-Id: <1405353735-26244-3-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1405353735-26244-1-git-send-email-amdragon@mit.edu> References: <1405353735-26244-1-git-send-email-amdragon@mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrAIsWRmVeSWpSXmKPExsUixG6nrqv0/3Cwwd43BhY3WrsZLfbd2cJk sXouj8X1mzOZHVg8dj3/y+Sxc9Zddo9nq24xe2w59J45gCWKyyYlNSezLLVI3y6BK2PtsrWM BduFKnYsvM3UwHidt4uRk0NCwERiw8RvjBC2mMSFe+vZuhi5OIQEZjNJzPzwkQnC2cgosfvF O6jMDSaJb1/esoC0CAnMZZQ49sMQxGYT0JDYtn852CgRAWmJnXdns4LYzAJZEhteHmQGsYUF /CUuXX0K1ssioCpxau8EsDivgIPE8+5j7BBnyEk03PjEBmJzCjhKvHlxjBVil4PEpjWfmSYw 8i9gZFjFKJuSW6Wbm5iZU5yarFucnJiXl1qka6iXm1mil5pSuokRFHCckjw7GN8cVDrEKMDB qMTDK/HucLAQa2JZcWXuIUZJDiYlUV6hX0AhvqT8lMqMxOKM+KLSnNTiQ4wSHMxKIrxHPwDl eFMSK6tSi/JhUtIcLErivG+trYKFBNITS1KzU1MLUotgsjIcHEoSvJv/AjUKFqWmp1akZeaU IKSZODhBhvMADb8CUsNbXJCYW5yZDpE/xagoJc7b9AcoIQCSyCjNg+uFJYRXjOJArwjzXgNp 5wEmE7juV0CDmYAGl9eADS5JREhJNTAymexhze/8yhatd/LalUq1ZMEXLMed5niwqDzbqrvR Wo1rUrKJVW/5ld2drKaqKyu7HvmcbZO4mNB070n2g5ldT4Wm7OYSeXP4bAtDg1rX06eHNrav 0xSe/uzK5RVcK9RmrUmr+TtXYGqCBz+jrdWE680LX11a4fIq54mu5fWlCy769vcecQhWYinO SDTUYi4qTgQAtaqJl+MCAAA= X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 16:02:55 -0000 This should help new users off to a better start with the addition of more sensible saved searches and default shortcut keys. Most existing users have probably customized this variable and won't be affected. --- emacs/notmuch-hello.el | 9 +++++++-- test/emacs.expected-output/notmuch-hello | 2 +- test/emacs.expected-output/notmuch-hello-long-names | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 061b27d..65d0627 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -93,8 +93,13 @@ (define-widget 'notmuch-saved-search-plist 'list (const :tag "Oldest-first" oldest-first) (const :tag "Newest-first" newest-first)))))) -(defcustom notmuch-saved-searches '((:name "inbox" :query "tag:inbox") - (:name "unread" :query "tag:unread")) +(defcustom notmuch-saved-searches + `((:name "inbox" :query "tag:inbox" :key ,(kbd "i")) + (:name "unread" :query "tag:unread" :key ,(kbd "u")) + (:name "flagged" :query "tag:flagged" :key ,(kbd "f")) + (:name "sent" :query "tag:sent" :key ,(kbd "t")) + (:name "drafts" :query "tag:draft" :key ,(kbd "d")) + (:name "all mail" :query "*" :key ,(kbd "a"))) "A list of saved searches to display. The saved search can be given in 3 forms. The preferred way is as diff --git a/test/emacs.expected-output/notmuch-hello b/test/emacs.expected-output/notmuch-hello index 2d69891..9ba4cfc 100644 --- a/test/emacs.expected-output/notmuch-hello +++ b/test/emacs.expected-output/notmuch-hello @@ -2,7 +2,7 @@ Saved searches: [edit] - 52 inbox 52 unread + 52 inbox 52 unread 52 all mail Search: . diff --git a/test/emacs.expected-output/notmuch-hello-long-names b/test/emacs.expected-output/notmuch-hello-long-names index 486d0d9..1c8d6eb 100644 --- a/test/emacs.expected-output/notmuch-hello-long-names +++ b/test/emacs.expected-output/notmuch-hello-long-names @@ -2,7 +2,7 @@ Saved searches: [edit] - 52 inbox 52 unread + 52 inbox 52 unread 52 all mail Search: . -- 2.0.0