unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs/tree: add notmuch-tree-quit-all
@ 2020-04-23 23:44 William Casarin
  2021-06-05 11:35 ` David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: William Casarin @ 2020-04-23 23:44 UTC (permalink / raw)
  To: notmuch

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@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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-06 17:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-23 23:44 [PATCH] emacs/tree: add notmuch-tree-quit-all William Casarin
2021-06-05 11:35 ` David Bremner
2021-06-05 11:39   ` David Bremner
2021-06-05 18:24     ` David Bremner
2021-06-06 17:40   ` William Casarin

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).