From: Austin Clements Date: Tue, 3 Sep 2013 21:45:20 +0000 (+2000) Subject: [PATCH v2 4/9] emacs: Remove notmuch-search quit continuation X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d063cf4c1f0a0983bca0ed471e4a6221f95a17bf;p=notmuch-archives.git [PATCH v2 4/9] emacs: Remove notmuch-search quit continuation --- diff --git a/ab/e18f3a878405f6414fa2fa7760a1c774c9710a b/ab/e18f3a878405f6414fa2fa7760a1c774c9710a new file mode 100644 index 000000000..bde539f5e --- /dev/null +++ b/ab/e18f3a878405f6414fa2fa7760a1c774c9710a @@ -0,0 +1,153 @@ +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 2B707431FDA + for ; Tue, 3 Sep 2013 14:46:04 -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 3GuWfVoA21Mj for ; + Tue, 3 Sep 2013 14:45:57 -0700 (PDT) +Received: from dmz-mailsec-scanner-2.mit.edu (dmz-mailsec-scanner-2.mit.edu + [18.9.25.13]) + by olra.theworths.org (Postfix) with ESMTP id 18350431E64 + for ; Tue, 3 Sep 2013 14:45:35 -0700 (PDT) +X-AuditID: 1209190d-b7f078e000000937-7b-5226587ef2e4 +Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) + by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP + id 46.6E.02359.E7856225; Tue, 3 Sep 2013 17:45:34 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id r83LjU6D029444; + Tue, 3 Sep 2013 17:45:31 -0400 +Received: from drake.dyndns.org (26-4-182.dynamic.csail.mit.edu [18.26.4.182]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r83LjRKH026857 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Tue, 3 Sep 2013 17:45:28 -0400 +Received: from amthrax by drake.dyndns.org with local (Exim 4.77) + (envelope-from ) + id 1VGyPe-0004xx-Tw; Tue, 03 Sep 2013 17:45:26 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH v2 4/9] emacs: Remove notmuch-search quit continuation +Date: Tue, 3 Sep 2013 17:45:20 -0400 +Message-Id: <1378244725-18846-5-git-send-email-amdragon@mit.edu> +X-Mailer: git-send-email 1.7.10.4 +In-Reply-To: <1378244725-18846-1-git-send-email-amdragon@mit.edu> +References: <1378244725-18846-1-git-send-email-amdragon@mit.edu> +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFjrMIsWRmVeSWpSXmKPExsUixCmqrFsXoRZksPCOukXTdGeL1XN5LK7f + nMnswOyxc9Zddo9b91+zezxbdYs5gDmKyyYlNSezLLVI3y6BK2Pf9tmsBaekK64eW8rWwNgi + 3sXIySEhYCKxecp1VghbTOLCvfVsXYxcHEIC+xgl9s3oZgdJCAlsYJT4u5YNwj7MJHFtEg+E + PZdR4sG2XBCbTUBDYtv+5YwgtoiAtMTOu7PBhjILREscuTwDrFdYwE3ieN92MJtFQFXi172X + YDW8Ag4Siw7cgDpCUaL72QSwGk4BR4neBYugbnCQaFp5mX0CI/8CRoZVjLIpuVW6uYmZOcWp + ybrFyYl5ealFukZ6uZkleqkppZsYwWElybuD8d1BpUOMAhyMSjy8DI9Ug4RYE8uKK3MPMUpy + MCmJ8h4JVQsS4kvKT6nMSCzOiC8qzUktPsQowcGsJMKb4AOU401JrKxKLcqHSUlzsCiJ8z59 + ejZQSCA9sSQ1OzW1ILUIJivDwaEkwVseDtQoWJSanlqRlplTgpBm4uAEGc4DNPxnGMjw4oLE + 3OLMdIj8KUZFKXHe+SDNAiCJjNI8uF5Y3L9iFAd6RZi3B6SKB5gy4LpfAQ1mAhqc9lkVZHBJ + IkJKqoFRcN/v/f3PAlNsPq24vD6cQ2n27i6LuYe2ic0N0+M6xOOh+HGiiaQ0c8r9EqVvScaT + FNb923iaZYXcqyn3FszjLFx5LnjDMk2FA23vxB67rbBrWLR7t9dk2/wAAZ0WI72nZ6YoHdES + YZ+6nN2QdXZYwQp9R9cky3s75+pW33uXdmXPRLu8vaEblViKMxINtZiLihMBHzVPWtYCAAA= +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, 03 Sep 2013 21:46:04 -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 +