unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: William Casarin <jb55@jb55.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 3/3] emacs/tree: add notmuch-tree-archive-thread-then-next
Date: Thu, 23 Apr 2020 16:47:15 -0700	[thread overview]
Message-ID: <20200423234715.6633-3-jb55@jb55.com> (raw)
In-Reply-To: <20200423234715.6633-1-jb55@jb55.com>

Now that notmuch-tree-next-thread acts more like its notmuch-show
counterpart, let's update the binding to move to the next thread after
archiving.

Signed-off-by: William Casarin <jb55@jb55.com>
---
 emacs/notmuch-tree.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index dcd335e5..6661b12e 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -325,7 +325,7 @@ FUNC."
     (define-key map [mouse-1] 'notmuch-tree-show-message)
     (define-key map "x" 'notmuch-tree-archive-message-then-next-or-exit)
     (define-key map "X" 'notmuch-tree-archive-thread-then-exit)
-    (define-key map "A" 'notmuch-tree-archive-thread)
+    (define-key map "A" 'notmuch-tree-archive-thread-then-next)
     (define-key map "a" 'notmuch-tree-archive-message-then-next)
     (define-key map "z" 'notmuch-tree-to-tree)
     (define-key map "n" 'notmuch-tree-next-matching-message)
@@ -481,6 +481,12 @@ NOT change the database."
     (notmuch-tree-close-message-window)
     (notmuch-tree query)))
 
+(defun notmuch-tree-archive-thread-then-next ()
+  "Archive all messages in the current buffer, then show next thread from search."
+  (interactive)
+  (notmuch-tree-archive-thread)
+  (notmuch-tree-next-thread))
+
 (defun notmuch-unthreaded-from-tree-current-query ()
   "Switch from tree view to unthreaded view"
   (interactive)
-- 
2.25.1

      parent reply	other threads:[~2020-04-23 23:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 23:47 [PATCH 1/3] emacs/tree: introduce notmuch-tree-parent-buffer variable William Casarin
2020-04-23 23:47 ` [PATCH 2/3] emacs/tree: enable moving to next thread in search results William Casarin
2020-04-24  0:07   ` William Casarin
2020-08-07 11:49     ` Teemu Likonen
2020-04-23 23:47 ` William Casarin [this message]

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=20200423234715.6633-3-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).