From: Austin Clements Date: Thu, 29 Aug 2013 16:25:52 +0000 (+2000) Subject: [PATCH 4/9] emacs: Remove notmuch-search quit continuation X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3ce0599709dc41924566c468facc1ec837ea7834;p=notmuch-archives.git [PATCH 4/9] emacs: Remove notmuch-search quit continuation --- diff --git a/6f/35ff5eebc10831ddc4c8f07625ed0cb9726043 b/6f/35ff5eebc10831ddc4c8f07625ed0cb9726043 new file mode 100644 index 000000000..36d823634 --- /dev/null +++ b/6f/35ff5eebc10831ddc4c8f07625ed0cb9726043 @@ -0,0 +1,154 @@ +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 26DE9431FC9 + for ; Thu, 29 Aug 2013 09:26:22 -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 ANV6O7spvFob for ; + Thu, 29 Aug 2013 09:26:17 -0700 (PDT) +Received: from dmz-mailsec-scanner-4.mit.edu (dmz-mailsec-scanner-4.mit.edu + [18.9.25.15]) + by olra.theworths.org (Postfix) with ESMTP id 594A2431FD2 + for ; Thu, 29 Aug 2013 09:26:08 -0700 (PDT) +X-AuditID: 1209190f-b7fa58e000000953-3b-521f761e20c9 +Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) + by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP + id 9B.4E.02387.E167F125; Thu, 29 Aug 2013 12:26:06 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id r7TGQ3eQ018777; + Thu, 29 Aug 2013 12:26:04 -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 r7TGQ1MZ014995 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Thu, 29 Aug 2013 12:26:02 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) + id 1VF52n-0007Wq-1G; Thu, 29 Aug 2013 12:26:01 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH 4/9] emacs: Remove notmuch-search quit continuation +Date: Thu, 29 Aug 2013 12:25:52 -0400 +Message-Id: <1377793557-28878-5-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 1.7.10.4 +In-Reply-To: <1377793557-28878-1-git-send-email-amdragon@mit.edu> +References: <1377793557-28878-1-git-send-email-amdragon@mit.edu> +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFtrEIsWRmVeSWpSXmKPExsUixG6nritXJh9k0H6X3eL6zZnMDowez1bd + Yg5gjOKySUnNySxLLdK3S+DK2Ld9NmvBKemKq8eWsjUwtoh3MXJySAiYSMxomcECYYtJXLi3 + nq2LkYtDSGAfo8T5bS+YIZyNjBIvV6xihHDuMEmc/vSZHcKZyyhx9MhmVpB+NgENiW37lzOC + 2CIC0hI7784GinNwMAuoSfzpUgExhQWcJda/cwOpYBFQlei48AxsM6+Ag8T1ZbOgrlCU6H42 + gQ3E5hRwlOi/+xYsLgRU8+fiU/YJjPwLGBlWMcqm5Fbp5iZm5hSnJusWJyfm5aUW6Zro5WaW + 6KWmlG5iBAUNpyT/DsZvB5UOMQpwMCrx8HYEygcJsSaWFVfmHmKU5GBSEuUNLAEK8SXlp1Rm + JBZnxBeV5qQWH2KU4GBWEuF9ywmU401JrKxKLcqHSUlzsCiJ8z57ejZQSCA9sSQ1OzW1ILUI + JivDwaEkwXsfZKhgUWp6akVaZk4JQpqJgxNkOA/Q8H8gNbzFBYm5xZnpEPlTjIpS4rw/QRIC + IImM0jy4XlhUv2IUB3pFmFeyFKiKB5gQ4LpfAQ1mAho8IV8OZHBJIkJKqoGxu/zE4lLnnFxF + Ld09NueO/G5jiXSLVVV371jGlH5yNfvX3QwlN7kYmZjbWme97ug4vTJtR2C3aND7v3MOuTwJ + nfr7zFPmOQ6Pji+KTd51vlV5w+ldy5KEYpT9ali0un5Uuka7xe5mV2hvES7PrFX7b3/bdm7d + iiU/7yfI7TfdoXqO08PpVogSS3FGoqEWc1FxIgD+9MUXxQIAAA== +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: Thu, 29 Aug 2013 16:26:22 -0000 + +Since notmuch-hello doesn't need this any more, we can remove this +hack. This also eliminates `notmuch-search-quit', so now all modes +bind "q" to `notmuch-kill-this-buffer'. +--- + emacs/notmuch.el | 22 +++++----------------- + 1 file changed, 5 insertions(+), 17 deletions(-) + +diff --git a/emacs/notmuch.el b/emacs/notmuch.el +index c964186..00cf271 100644 +--- a/emacs/notmuch.el ++++ b/emacs/notmuch.el +@@ -213,8 +213,8 @@ For a mouse binding, return nil." + (defvar notmuch-search-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "?" 'notmuch-help) +- (define-key map "q" 'notmuch-search-quit) +- (define-key map "x" 'notmuch-search-quit) ++ (define-key map "q" 'notmuch-kill-this-buffer) ++ (define-key map "x" 'notmuch-kill-this-buffer) + (define-key map (kbd "") 'notmuch-search-scroll-down) + (define-key map "b" 'notmuch-search-scroll-down) + (define-key map " " 'notmuch-search-scroll-up) +@@ -257,18 +257,9 @@ For a mouse binding, return nil." + (defvar notmuch-search-query-string) + (defvar notmuch-search-target-thread) + (defvar notmuch-search-target-line) +-(defvar notmuch-search-continuation) + + (defvar notmuch-search-disjunctive-regexp "\\<[oO][rR]\\>") + +-(defun notmuch-search-quit () +- "Exit the search buffer, calling any defined continuation function." +- (interactive) +- (let ((continuation notmuch-search-continuation)) +- (notmuch-kill-this-buffer) +- (when continuation +- (funcall continuation)))) +- + (defun notmuch-search-scroll-up () + "Move forward through search results by one window's worth." + (interactive) +@@ -412,7 +403,6 @@ Complete list of currently available key bindings: + (make-local-variable 'notmuch-search-oldest-first) + (make-local-variable 'notmuch-search-target-thread) + (make-local-variable 'notmuch-search-target-line) +- (set (make-local-variable 'notmuch-search-continuation) nil) + (set (make-local-variable 'scroll-preserve-screen-position) t) + (add-to-invisibility-spec (cons 'ellipsis t)) + (use-local-map notmuch-search-mode-map) +@@ -896,7 +886,7 @@ PROMPT is the string to prompt with." + 'notmuch-search-history nil nil))))) + + ;;;###autoload +-(defun notmuch-search (&optional query oldest-first target-thread target-line continuation) ++(defun notmuch-search (&optional query oldest-first target-thread target-line) + "Run \"notmuch search\" with the given `query' and display results. + + If `query' is nil, it is read interactively from the minibuffer. +@@ -928,7 +918,6 @@ the configured default sort order." + (set 'notmuch-search-oldest-first oldest-first) + (set 'notmuch-search-target-thread target-thread) + (set 'notmuch-search-target-line target-line) +- (set 'notmuch-search-continuation continuation) + (let ((proc (get-buffer-process (current-buffer))) + (inhibit-read-only t)) + (if proc +@@ -965,10 +954,9 @@ same relative position within the new buffer." + (let ((target-line (line-number-at-pos)) + (oldest-first notmuch-search-oldest-first) + (target-thread (notmuch-search-find-thread-id 'bare)) +- (query notmuch-search-query-string) +- (continuation notmuch-search-continuation)) ++ (query notmuch-search-query-string)) + (notmuch-kill-this-buffer) +- (notmuch-search query oldest-first target-thread target-line continuation) ++ (notmuch-search query oldest-first target-thread target-line) + (goto-char (point-min)))) + + (defcustom notmuch-poll-script nil +-- +1.7.10.4 +