[PATCH v2 4/9] emacs: Remove notmuch-search quit continuation
authorAustin Clements <amdragon@MIT.EDU>
Tue, 3 Sep 2013 21:45:20 +0000 (17:45 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:56:53 +0000 (09:56 -0800)
ab/e18f3a878405f6414fa2fa7760a1c774c9710a [new file with mode: 0644]

diff --git a/ab/e18f3a878405f6414fa2fa7760a1c774c9710a b/ab/e18f3a878405f6414fa2fa7760a1c774c9710a
new file mode 100644 (file)
index 0000000..bde539f
--- /dev/null
@@ -0,0 +1,153 @@
+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 2B707431FDA\r
+       for <notmuch@notmuchmail.org>; Tue,  3 Sep 2013 14:46:04 -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 3GuWfVoA21Mj for <notmuch@notmuchmail.org>;\r
+       Tue,  3 Sep 2013 14:45:57 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-2.mit.edu (dmz-mailsec-scanner-2.mit.edu\r
+       [18.9.25.13])\r
+       by olra.theworths.org (Postfix) with ESMTP id 18350431E64\r
+       for <notmuch@notmuchmail.org>; Tue,  3 Sep 2013 14:45:35 -0700 (PDT)\r
+X-AuditID: 1209190d-b7f078e000000937-7b-5226587ef2e4\r
+Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
+       by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 46.6E.02359.E7856225; Tue,  3 Sep 2013 17:45:34 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id r83LjU6D029444; \r
+       Tue, 3 Sep 2013 17:45:31 -0400\r
+Received: from drake.dyndns.org (26-4-182.dynamic.csail.mit.edu [18.26.4.182])\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 r83LjRKH026857\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Tue, 3 Sep 2013 17:45:28 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1VGyPe-0004xx-Tw; Tue, 03 Sep 2013 17:45:26 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 4/9] emacs: Remove notmuch-search quit continuation\r
+Date: Tue,  3 Sep 2013 17:45:20 -0400\r
+Message-Id: <1378244725-18846-5-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <1378244725-18846-1-git-send-email-amdragon@mit.edu>\r
+References: <1378244725-18846-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFjrMIsWRmVeSWpSXmKPExsUixCmqrFsXoRZksPCOukXTdGeL1XN5LK7f\r
+       nMnswOyxc9Zddo9b91+zezxbdYs5gDmKyyYlNSezLLVI3y6BK2Pf9tmsBaekK64eW8rWwNgi\r
+       3sXIySEhYCKxecp1VghbTOLCvfVsXYxcHEIC+xgl9s3oZgdJCAlsYJT4u5YNwj7MJHFtEg+E\r
+       PZdR4sG2XBCbTUBDYtv+5YwgtoiAtMTOu7PBhjILREscuTwDrFdYwE3ieN92MJtFQFXi172X\r
+       YDW8Ag4Siw7cgDpCUaL72QSwGk4BR4neBYugbnCQaFp5mX0CI/8CRoZVjLIpuVW6uYmZOcWp\r
+       ybrFyYl5ealFukZ6uZkleqkppZsYwWElybuD8d1BpUOMAhyMSjy8DI9Ug4RYE8uKK3MPMUpy\r
+       MCmJ8h4JVQsS4kvKT6nMSCzOiC8qzUktPsQowcGsJMKb4AOU401JrKxKLcqHSUlzsCiJ8z59\r
+       ejZQSCA9sSQ1OzW1ILUIJivDwaEkwVseDtQoWJSanlqRlplTgpBm4uAEGc4DNPxnGMjw4oLE\r
+       3OLMdIj8KUZFKXHe+SDNAiCJjNI8uF5Y3L9iFAd6RZi3B6SKB5gy4LpfAQ1mAhqc9lkVZHBJ\r
+       IkJKqoFRcN/v/f3PAlNsPq24vD6cQ2n27i6LuYe2ic0N0+M6xOOh+HGiiaQ0c8r9EqVvScaT\r
+       FNb923iaZYXcqyn3FszjLFx5LnjDMk2FA23vxB67rbBrWLR7t9dk2/wAAZ0WI72nZ6YoHdES\r
+       YZ+6nN2QdXZYwQp9R9cky3s75+pW33uXdmXPRLu8vaEblViKMxINtZiLihMBHzVPWtYCAAA=\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: Tue, 03 Sep 2013 21:46:04 -0000\r
+\r
+Since notmuch-hello doesn't need this any more, we can remove this\r
+hack.  This also eliminates `notmuch-search-quit', so now all modes\r
+bind "q" to `notmuch-kill-this-buffer'.\r
+---\r
+ emacs/notmuch.el |   22 +++++-----------------\r
+ 1 file changed, 5 insertions(+), 17 deletions(-)\r
+\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index c964186..00cf271 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -213,8 +213,8 @@ For a mouse binding, return nil."\r
+ (defvar notmuch-search-mode-map\r
+   (let ((map (make-sparse-keymap)))\r
+     (define-key map "?" 'notmuch-help)\r
+-    (define-key map "q" 'notmuch-search-quit)\r
+-    (define-key map "x" 'notmuch-search-quit)\r
++    (define-key map "q" 'notmuch-kill-this-buffer)\r
++    (define-key map "x" 'notmuch-kill-this-buffer)\r
+     (define-key map (kbd "<DEL>") 'notmuch-search-scroll-down)\r
+     (define-key map "b" 'notmuch-search-scroll-down)\r
+     (define-key map " " 'notmuch-search-scroll-up)\r
+@@ -257,18 +257,9 @@ For a mouse binding, return nil."\r
+ (defvar notmuch-search-query-string)\r
+ (defvar notmuch-search-target-thread)\r
+ (defvar notmuch-search-target-line)\r
+-(defvar notmuch-search-continuation)\r
\r
+ (defvar notmuch-search-disjunctive-regexp      "\\<[oO][rR]\\>")\r
\r
+-(defun notmuch-search-quit ()\r
+-  "Exit the search buffer, calling any defined continuation function."\r
+-  (interactive)\r
+-  (let ((continuation notmuch-search-continuation))\r
+-    (notmuch-kill-this-buffer)\r
+-    (when continuation\r
+-      (funcall continuation))))\r
+-\r
+ (defun notmuch-search-scroll-up ()\r
+   "Move forward through search results by one window's worth."\r
+   (interactive)\r
+@@ -412,7 +403,6 @@ Complete list of currently available key bindings:\r
+   (make-local-variable 'notmuch-search-oldest-first)\r
+   (make-local-variable 'notmuch-search-target-thread)\r
+   (make-local-variable 'notmuch-search-target-line)\r
+-  (set (make-local-variable 'notmuch-search-continuation) nil)\r
+   (set (make-local-variable 'scroll-preserve-screen-position) t)\r
+   (add-to-invisibility-spec (cons 'ellipsis t))\r
+   (use-local-map notmuch-search-mode-map)\r
+@@ -896,7 +886,7 @@ PROMPT is the string to prompt with."\r
+                             'notmuch-search-history nil nil)))))\r
\r
+ ;;;###autoload\r
+-(defun notmuch-search (&optional query oldest-first target-thread target-line continuation)\r
++(defun notmuch-search (&optional query oldest-first target-thread target-line)\r
+   "Run \"notmuch search\" with the given `query' and display results.\r
\r
+ If `query' is nil, it is read interactively from the minibuffer.\r
+@@ -928,7 +918,6 @@ the configured default sort order."\r
+     (set 'notmuch-search-oldest-first oldest-first)\r
+     (set 'notmuch-search-target-thread target-thread)\r
+     (set 'notmuch-search-target-line target-line)\r
+-    (set 'notmuch-search-continuation continuation)\r
+     (let ((proc (get-buffer-process (current-buffer)))\r
+         (inhibit-read-only t))\r
+       (if proc\r
+@@ -965,10 +954,9 @@ same relative position within the new buffer."\r
+   (let ((target-line (line-number-at-pos))\r
+       (oldest-first notmuch-search-oldest-first)\r
+       (target-thread (notmuch-search-find-thread-id 'bare))\r
+-      (query notmuch-search-query-string)\r
+-      (continuation notmuch-search-continuation))\r
++      (query notmuch-search-query-string))\r
+     (notmuch-kill-this-buffer)\r
+-    (notmuch-search query oldest-first target-thread target-line continuation)\r
++    (notmuch-search query oldest-first target-thread target-line)\r
+     (goto-char (point-min))))\r
\r
+ (defcustom notmuch-poll-script nil\r
+-- \r
+1.7.10.4\r
+\r