[PATCH] emacs/tree: add notmuch-tree-quit-all
William Casarin
jb55 at jb55.com
Thu Apr 23 16:44:42 PDT 2020
This is a simple binding in notmuch-tree-mode that closes both the
message buffer and thread buffer at the same time. This is a common
action after entering a thread from search with M-Enter.
Signed-off-by: William Casarin <jb55 at jb55.com>
---
emacs/notmuch-tree.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index e5c23de2..701d12f8 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -293,6 +293,7 @@ FUNC."
;; Override because we want to close message pane first.
(define-key map [remap notmuch-jump-search] (notmuch-tree-close-message-pane-and #'notmuch-jump-search))
+ (define-key map "Q" 'notmuch-tree-quit-all)
(define-key map "S" 'notmuch-search-from-tree-current-query)
(define-key map "U" 'notmuch-unthreaded-from-tree-current-query)
(define-key map "Z" 'notmuch-tree-from-unthreaded-current-query)
@@ -591,6 +592,10 @@ Shows in split pane or whole window according to value of
(when (or (not (notmuch-tree-close-message-window)) kill-both)
(kill-buffer (current-buffer))))
+(defun notmuch-tree-quit-all ()
+ (interactive)
+ (notmuch-tree-quit t))
+
(defun notmuch-tree-close-message-window ()
"Close the message-window. Return t if close succeeds."
(interactive)
--
2.25.1
More information about the notmuch
mailing list