From e9617ed60872757893e1b84968f02a95f413052c Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 5 Aug 2014 21:45:21 +2000 Subject: [PATCH] [PATCH v3 2/2] emacs: Expand default saved searches and add shortcut keys --- 44/80303d4efae3d03d6faeff1fd7a4750f136aa6 | 135 ++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 44/80303d4efae3d03d6faeff1fd7a4750f136aa6 diff --git a/44/80303d4efae3d03d6faeff1fd7a4750f136aa6 b/44/80303d4efae3d03d6faeff1fd7a4750f136aa6 new file mode 100644 index 000000000..a8ba97a3f --- /dev/null +++ b/44/80303d4efae3d03d6faeff1fd7a4750f136aa6 @@ -0,0 +1,135 @@ +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 4D59C431FBD + for ; Mon, 4 Aug 2014 18:45:35 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] 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 CxmgdUKiHX+m for ; + Mon, 4 Aug 2014 18:45:29 -0700 (PDT) +Received: from dmz-mailsec-scanner-5.mit.edu (dmz-mailsec-scanner-5.mit.edu + [18.7.68.34]) + by olra.theworths.org (Postfix) with ESMTP id B383C431FAE + for ; Mon, 4 Aug 2014 18:45:29 -0700 (PDT) +X-AuditID: 12074422-f79be6d000007518-2d-53e03739b80f +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-5.mit.edu (Symantec Messaging Gateway) with SMTP + id 79.4B.29976.93730E35; Mon, 4 Aug 2014 21:45:29 -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 s751jR37014355; + Mon, 4 Aug 2014 21:45:27 -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 s751jPS7005239 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Mon, 4 Aug 2014 21:45:26 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) + id 1XETob-0004bB-7w; Mon, 04 Aug 2014 21:45:25 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH v3 2/2] emacs: Expand default saved searches and add shortcut + keys +Date: Mon, 4 Aug 2014 21:45:21 -0400 +Message-Id: <1407203121-17640-2-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 2.0.0 +In-Reply-To: <1407203121-17640-1-git-send-email-amdragon@mit.edu> +References: <20140805014403.GX13893@mit.edu> + <1407203121-17640-1-git-send-email-amdragon@mit.edu> +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFrrIIsWRmVeSWpSXmKPExsUixCmqrWtp/iDY4ONOTosbrd2MFvvubGGy + WD2Xx+L6zZnMDiweu57/ZfLYOesuu8ezVbeYPbYces8cwBLFZZOSmpNZllqkb5fAlbF22VrG + gu1CFTsW3mZqYLzO28XIySEhYCKxaO9CZghbTOLCvfVsXYxcHEICs5kkelt2s0I4GxglTq1u + hsrcZpK4sPkxM4Qzl1Hi8eTVTCD9bAIaEtv2L2cEsUUEpCV23p3NCmIzC2RJbHh5EGyHsECQ + xJSuN2BxFgFViUX/L4D18go4SJztX8UCcYecRMONT2wgNqeAo8S6y5vA4kICyRL3Li1im8DI + v4CRYRWjbEpulW5uYmZOcWqybnFyYl5eapGuqV5uZoleakrpJkZQyLG7KO1g/HlQ6RCjAAej + Eg+vgNr9YCHWxLLiytxDjJIcTEqivKF6D4KF+JLyUyozEosz4otKc1KLDzFKcDArifDmCwLl + eFMSK6tSi/JhUtIcLErivG+trYKFBNITS1KzU1MLUotgsjIcHEoSvD9NgRoFi1LTUyvSMnNK + ENJMHJwgw3mAhjubgQwvLkjMLc5Mh8ifYlSUEufNBGkWAElklObB9cJSwitGcaBXhHkvgFTx + ANMJXPcroMFMQIPNdO6DDC5JREhJNTD6NyZ908h9ts10pjn/0TkCz3MXMDLmTHtk8mf2CtfY + r7sWeD1wWsoVp3T8n2268sm9L2+87pM5a1pyjv9U6r5Di7PXpV35+fGAYfWy1eX78/mFizh+ + vPy00aNq6zbxnDdzk6fNVG44dI6/gXmTU7fKwejJ826d0GRLX3P/sZcV25HNvxtW8Cq9V2Ip + zkg01GIuKk4EAElZXFDkAgAA +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, 05 Aug 2014 01:45:35 -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