[PATCH 2/2] emacs: Expand default saved searches and add shortcut keys
authorAustin Clements <amdragon@MIT.EDU>
Mon, 14 Jul 2014 16:02:15 +0000 (12:02 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:03:37 +0000 (10:03 -0800)
cf/24b9180ea3a8b0dd35909275087b0af1035575 [new file with mode: 0644]

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