From: Austin Clements Date: Tue, 3 Sep 2013 21:45:25 +0000 (+2000) Subject: [PATCH v2 9/9] emacs: Move ?, q, s, m, =, and G to the common keymap X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e867aa1cf6216dd18f579a5600620db6d0c633d5;p=notmuch-archives.git [PATCH v2 9/9] emacs: Move ?, q, s, m, =, and G to the common keymap --- diff --git a/64/d65ef60b4ac86716ab9d43c57e9697ff536a05 b/64/d65ef60b4ac86716ab9d43c57e9697ff536a05 new file mode 100644 index 000000000..574511541 --- /dev/null +++ b/64/d65ef60b4ac86716ab9d43c57e9697ff536a05 @@ -0,0 +1,175 @@ +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 182E6431E82 + for ; Tue, 3 Sep 2013 14:45:40 -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 tK-09TKo+Jne for ; + Tue, 3 Sep 2013 14:45:32 -0700 (PDT) +Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu + [18.7.68.37]) + by olra.theworths.org (Postfix) with ESMTP id 8243A431FD6 + for ; Tue, 3 Sep 2013 14:45:32 -0700 (PDT) +X-AuditID: 12074425-b7f0c8e000000953-9c-5226587b54af +Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) + by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP + id 56.EF.02387.B7856225; Tue, 3 Sep 2013 17:45:31 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id r83LjU0t019874; + 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 r83LjRfQ026866 + (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 1VGyPf-0004yF-0W; Tue, 03 Sep 2013 17:45:27 -0400 +From: Austin Clements +To: notmuch@notmuchmail.org +Subject: [PATCH v2 9/9] emacs: Move ?, q, s, m, =, and G to the common keymap +Date: Tue, 3 Sep 2013 17:45:25 -0400 +Message-Id: <1378244725-18846-10-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+NgFjrKIsWRmVeSWpSXmKPExsUixG6nolsdoRZk8P2MhUXTdGeL1XN5LK7f + nMnswOyxc9Zddo9b91+zezxbdYs5gDmKyyYlNSezLLVI3y6BK6PzdgNrwVnViic9a1kaGBfJ + dzFyckgImEh8/zuRFcIWk7hwbz0biC0ksI9R4tGsmC5GLiB7A6PEhi39rBDOYSaJnWu6mCCc + uYwSU94vYgdpYRPQkNi2fzkjiC0iIC2x8+5ssLHMAtESRy7PABsrLOArsePjdSYQm0VAVeLk + 1Adg9bwCjhLf7ixjhzhDUaL72QSwek6geO8CiPlCAg4STSsvs09g5F/AyLCKUTYlt0o3NzEz + pzg1Wbc4OTEvL7VI10IvN7NELzWldBMjOLRcVHcwTjikdIhRgINRiYd3xX3VICHWxLLiytxD + jJIcTEqivEdC1YKE+JLyUyozEosz4otKc1KLDzFKcDArifAm+ADleFMSK6tSi/JhUtIcLEri + vM+fng0UEkhPLEnNTk0tSC2CycpwcChJ8K4PB2oULEpNT61Iy8wpQUgzcXCCDOcBGv4SpIa3 + uCAxtzgzHSJ/ilFRSpx3PkhCACSRUZoH1wuL/VeM4kCvCPMeB6niAaYNuO5XQIOZgAanfVYF + GVySiJCSamD0V97x/d9595s7ZddyeUqdXZh92LM8tDSb2e/qJEkt61vh37ZbnpBKy9Bi+KBS + 4GrzrKcodPr73ls/TzRI+YfOchPQy/y46UNgl+m77wcyk8uStc2sv1/h0RB5Xsp03mjav1Xq + /jxJAbvPMDl+k09ofLD9jmL1qh0uznMWnmr8cvcqG9+x9p1KLMUZiYZazEXFiQDqZrWX2AIA AA== +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:45:41 -0000 + +The only user-visible effect of this should be that "G" now works in +show mode (previously it was unbound for no apparent reason). + +This shared keymap gives us one place to put global commands, which +both forces us to think about what commands should be global, and +ensures their bindings can't diverge (like the missing "G" in show). +--- + emacs/notmuch-hello.el | 6 ------ + emacs/notmuch-lib.el | 6 ++++++ + emacs/notmuch-show.el | 5 ----- + emacs/notmuch.el | 6 ------ + 4 files changed, 6 insertions(+), 17 deletions(-) + +diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el +index 46baf55..55c416a 100644 +--- a/emacs/notmuch-hello.el ++++ b/emacs/notmuch-hello.el +@@ -525,13 +525,7 @@ Such a list can be computed with `notmuch-hello-query-counts'." + (set-keymap-parent map notmuch-common-keymap) + (define-key map "v" (lambda () "Display the notmuch version" (interactive) + (message "notmuch version %s" (notmuch-version)))) +- (define-key map "?" 'notmuch-help) +- (define-key map "q" 'notmuch-kill-this-buffer) +- (define-key map "=" 'notmuch-refresh-this-buffer) +- (define-key map "G" 'notmuch-poll-and-refresh-this-buffer) + (define-key map (kbd "") 'widget-backward) +- (define-key map "m" 'notmuch-mua-new-mail) +- (define-key map "s" 'notmuch-search) + map) + "Keymap for \"notmuch hello\" buffers.") + (fset 'notmuch-hello-mode-map notmuch-hello-mode-map) +diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el +index 2bf1d2f..58f3313 100644 +--- a/emacs/notmuch-lib.el ++++ b/emacs/notmuch-lib.el +@@ -130,6 +130,12 @@ For example, if you wanted to remove an \"inbox\" tag and add an + + (defvar notmuch-common-keymap + (let ((map (make-sparse-keymap))) ++ (define-key map "?" 'notmuch-help) ++ (define-key map "q" 'notmuch-kill-this-buffer) ++ (define-key map "s" 'notmuch-search) ++ (define-key map "m" 'notmuch-mua-new-mail) ++ (define-key map "=" 'notmuch-refresh-this-buffer) ++ (define-key map "G" 'notmuch-poll-and-refresh-this-buffer) + map) + "Keymap shared by all notmuch modes.") + +diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +index 9f67340..9d8b785 100644 +--- a/emacs/notmuch-show.el ++++ b/emacs/notmuch-show.el +@@ -1265,14 +1265,10 @@ reset based on the original query." + (defvar notmuch-show-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map notmuch-common-keymap) +- (define-key map "?" 'notmuch-help) +- (define-key map "q" 'notmuch-kill-this-buffer) + (define-key map (kbd "") 'widget-backward) + (define-key map (kbd "M-TAB") 'notmuch-show-previous-button) + (define-key map (kbd "") 'notmuch-show-previous-button) + (define-key map (kbd "TAB") 'notmuch-show-next-button) +- (define-key map "s" 'notmuch-search) +- (define-key map "m" 'notmuch-mua-new-mail) + (define-key map "f" 'notmuch-show-forward-message) + (define-key map "r" 'notmuch-show-reply-sender) + (define-key map "R" 'notmuch-show-reply) +@@ -1280,7 +1276,6 @@ reset based on the original query." + (define-key map "w" 'notmuch-show-save-attachments) + (define-key map "V" 'notmuch-show-view-raw-message) + (define-key map "c" 'notmuch-show-stash-map) +- (define-key map "=" 'notmuch-refresh-this-buffer) + (define-key map "h" 'notmuch-show-toggle-visibility-headers) + (define-key map "*" 'notmuch-show-tag-all) + (define-key map "-" 'notmuch-show-remove-tag) +diff --git a/emacs/notmuch.el b/emacs/notmuch.el +index e098bd7..4de6229 100644 +--- a/emacs/notmuch.el ++++ b/emacs/notmuch.el +@@ -199,8 +199,6 @@ first line of documentation for the bound function." + (defvar notmuch-search-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map notmuch-common-keymap) +- (define-key map "?" 'notmuch-help) +- (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) +@@ -211,12 +209,8 @@ first line of documentation for the bound function." + (define-key map "n" 'notmuch-search-next-thread) + (define-key map "r" 'notmuch-search-reply-to-thread-sender) + (define-key map "R" 'notmuch-search-reply-to-thread) +- (define-key map "m" 'notmuch-mua-new-mail) +- (define-key map "s" 'notmuch-search) + (define-key map "o" 'notmuch-search-toggle-order) + (define-key map "c" 'notmuch-search-stash-map) +- (define-key map "=" 'notmuch-refresh-this-buffer) +- (define-key map "G" 'notmuch-poll-and-refresh-this-buffer) + (define-key map "t" 'notmuch-search-filter-by-tag) + (define-key map "f" 'notmuch-search-filter) + (define-key map [mouse-1] 'notmuch-search-show-thread) +-- +1.7.10.4 +