[PATCH 3/3] emacs/tree: add notmuch-tree-archive-thread-then-next

Subject: [PATCH 3/3] emacs/tree: add notmuch-tree-archive-thread-then-next

Date: Thu, 23 Apr 2020 16:47:15 -0700

To: notmuch@notmuchmail.org

Cc:

From: William Casarin


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

_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: