From fc266f0f404650e928bf7d288292495b872aff67 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Wed, 16 Jul 2014 10:06:06 +2000 Subject: [PATCH] [PATCH v2 2/2] emacs: Expand default saved searches and add shortcut keys --- f2/33e41b49c6213468a2f31b1889d240f8454a4d | 137 ++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 f2/33e41b49c6213468a2f31b1889d240f8454a4d diff --git a/f2/33e41b49c6213468a2f31b1889d240f8454a4d b/f2/33e41b49c6213468a2f31b1889d240f8454a4d new file mode 100644 index 000000000..620aa3528 --- /dev/null +++ b/f2/33e41b49c6213468a2f31b1889d240f8454a4d @@ -0,0 +1,137 @@ +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 F0DFE431FBD + for ; Tue, 15 Jul 2014 07:06:33 -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 aBBMy4qjJJG1 for ; + Tue, 15 Jul 2014 07:06:28 -0700 (PDT) +Received: from dmz-mailsec-scanner-6.mit.edu (dmz-mailsec-scanner-6.mit.edu + [18.7.68.35]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id AC0A5431FC3 + for ; Tue, 15 Jul 2014 07:06:23 -0700 (PDT) +X-AuditID: 12074423-f79bf6d000007580-25-53c5355e391c +Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) + (using TLS with cipher AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP + id 29.09.30080.F5535C35; Tue, 15 Jul 2014 10:06:23 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id s6FE6GIx018306; + Tue, 15 Jul 2014 10:06:16 -0400 +Received: from drake.dyndns.org + (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com + [216.15.114.40]) (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s6FE6Djl008839 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Tue, 15 Jul 2014 10:06:15 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) + id 1X73Mx-0000h4-MW; Tue, 15 Jul 2014 10:06:11 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH v2 2/2] emacs: Expand default saved searches and add shortcut + keys +Date: Tue, 15 Jul 2014 10:06:06 -0400 +Message-Id: <1405433166-2198-3-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 2.0.0 +In-Reply-To: <1405433166-2198-1-git-send-email-amdragon@mit.edu> +References: <1405353735-26244-1-git-send-email-amdragon@mit.edu> + <1405433166-2198-1-git-send-email-amdragon@mit.edu> +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFjrPIsWRmVeSWpSXmKPExsUixCmqrRtvejTY4NUXFosbrd2MFvvubGGy + WD2Xx+L6zZnMDiweu57/ZfLYOesuu8ezVbeYPbYces8cwBLFZZOSmpNZllqkb5fAlbF22VrG + gu1CFTsW3mZqYLzO28XIwSEhYCJxZ5lZFyMnkCkmceHeerYuRi4OIYHZTBInbz1mgXA2Mkoc + erCQEcK5wySx6P89dghnLqPErH1T2ED62QQ0JLbtX84IYosISEvsvDubFcRmFsiS2PDyIDPI + OmGBIIkpb+pBwiwCqhLN684yg9i8AvYSn9bdZIE4Q06i4cYnsJGcAg4SH7f+BrOFBMoknuw7 + yDqBkX8BI8MqRtmU3Crd3MTMnOLUZN3i5MS8vNQiXTO93MwSvdSU0k2MoHBjd1HewfjnoNIh + RgEORiUeXol3h4OFWBPLiitzDzFKcjApifIWsx0NFuJLyk+pzEgszogvKs1JLT7EKMHBrCTC + K2kClONNSaysSi3Kh0lJc7AoifO+tbYKFhJITyxJzU5NLUgtgsnKcHAoSfAygzQKFqWmp1ak + ZeaUIKSZODhBhvMADecFG15ckJhbnJkOkT/FqCglznvCGCghAJLIKM2D64Wlg1eM4kCvCPNe + AaniAaYSuO5XQIOZgAaX1xwGGVySiJCSamDczCkirv1VSOI8++0f8/6dqJXPux8gI5FWN1lP + yMvlVZSIQoK9R9T0Bpf/+tUGdy4eOnRmInPHv2+qnBoy3WzmLGfu7/HrZds+QVDKXl7F2OiU + S46nxdSa1xPXqcrmsn6+6Pyx8CSLWTzXBn/GbRJH7MJ1JcIUV7BdC4/qun09uoFdJDT7jxJL + cUaioRZzUXEiAJX+4GLiAgAA +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: Tue, 15 Jul 2014 14:06:34 -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 + -- 2.26.2