[PATCH 4/9] emacs: Remove notmuch-search quit continuation
authorAustin Clements <amdragon@MIT.EDU>
Thu, 29 Aug 2013 16:25:52 +0000 (12:25 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:56:45 +0000 (09:56 -0800)
6f/35ff5eebc10831ddc4c8f07625ed0cb9726043 [new file with mode: 0644]

diff --git a/6f/35ff5eebc10831ddc4c8f07625ed0cb9726043 b/6f/35ff5eebc10831ddc4c8f07625ed0cb9726043
new file mode 100644 (file)
index 0000000..36d8236
--- /dev/null
@@ -0,0 +1,154 @@
+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 26DE9431FC9\r
+       for <notmuch@notmuchmail.org>; Thu, 29 Aug 2013 09:26:22 -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 ANV6O7spvFob for <notmuch@notmuchmail.org>;\r
+       Thu, 29 Aug 2013 09:26:17 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-4.mit.edu (dmz-mailsec-scanner-4.mit.edu\r
+       [18.9.25.15])\r
+       by olra.theworths.org (Postfix) with ESMTP id 594A2431FD2\r
+       for <notmuch@notmuchmail.org>; Thu, 29 Aug 2013 09:26:08 -0700 (PDT)\r
+X-AuditID: 1209190f-b7fa58e000000953-3b-521f761e20c9\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 9B.4E.02387.E167F125; Thu, 29 Aug 2013 12:26:06 -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 r7TGQ3eQ018777; \r
+       Thu, 29 Aug 2013 12:26:04 -0400\r
+Received: from drake.dyndns.org\r
+       (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+       [216.15.114.40]) (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 r7TGQ1MZ014995\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Thu, 29 Aug 2013 12:26:02 -0400\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1VF52n-0007Wq-1G; Thu, 29 Aug 2013 12:26:01 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 4/9] emacs: Remove notmuch-search quit continuation\r
+Date: Thu, 29 Aug 2013 12:25:52 -0400\r
+Message-Id: <1377793557-28878-5-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <1377793557-28878-1-git-send-email-amdragon@mit.edu>\r
+References: <1377793557-28878-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFtrEIsWRmVeSWpSXmKPExsUixG6nritXJh9k0H6X3eL6zZnMDowez1bd\r
+       Yg5gjOKySUnNySxLLdK3S+DK2Ld9NmvBKemKq8eWsjUwtoh3MXJySAiYSMxomcECYYtJXLi3\r
+       nq2LkYtDSGAfo8T5bS+YIZyNjBIvV6xihHDuMEmc/vSZHcKZyyhx9MhmVpB+NgENiW37lzOC\r
+       2CIC0hI7784GinNwMAuoSfzpUgExhQWcJda/cwOpYBFQlei48AxsM6+Ag8T1ZbOgrlCU6H42\r
+       gQ3E5hRwlOi/+xYsLgRU8+fiU/YJjPwLGBlWMcqm5Fbp5iZm5hSnJusWJyfm5aUW6Zro5WaW\r
+       6KWmlG5iBAUNpyT/DsZvB5UOMQpwMCrx8HYEygcJsSaWFVfmHmKU5GBSEuUNLAEK8SXlp1Rm\r
+       JBZnxBeV5qQWH2KU4GBWEuF9ywmU401JrKxKLcqHSUlzsCiJ8z57ejZQSCA9sSQ1OzW1ILUI\r
+       JivDwaEkwXsfZKhgUWp6akVaZk4JQpqJgxNkOA/Q8H8gNbzFBYm5xZnpEPlTjIpS4rw/QRIC\r
+       IImM0jy4XlhUv2IUB3pFmFeyFKiKB5gQ4LpfAQ1mAho8IV8OZHBJIkJKqoGxu/zE4lLnnFxF\r
+       Ld09NueO/G5jiXSLVVV371jGlH5yNfvX3QwlN7kYmZjbWme97ug4vTJtR2C3aND7v3MOuTwJ\r
+       nfr7zFPmOQ6Pji+KTd51vlV5w+ldy5KEYpT9ali0un5Uuka7xe5mV2hvES7PrFX7b3/bdm7d\r
+       iiU/7yfI7TfdoXqO08PpVogSS3FGoqEWc1FxIgD+9MUXxQIAAA==\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: Thu, 29 Aug 2013 16:26:22 -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