From: William Casarin <jb55@jb55.com>
To: notmuch@notmuchmail.org
Subject: [PATCH] emacs/tree: add notmuch-tree-quit-all
Date: Thu, 23 Apr 2020 16:44:42 -0700 [thread overview]
Message-ID: <20200423234442.3640-1-jb55@jb55.com> (raw)
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
next reply other threads:[~2020-04-23 23:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-23 23:44 William Casarin [this message]
2021-06-05 11:35 ` [PATCH] emacs/tree: add notmuch-tree-quit-all David Bremner
2021-06-05 11:39 ` David Bremner
2021-06-05 18:24 ` David Bremner
2021-06-06 17:40 ` William Casarin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200423234442.3640-1-jb55@jb55.com \
--to=jb55@jb55.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).