emacs/tree: add notmuch-tree-archive-thread-then-exit
authorWilliam Casarin <jb55@jb55.com>
Sat, 4 Apr 2020 20:41:41 +0000 (13:41 -0700)
committerDavid Bremner <david@tethera.net>
Mon, 6 Apr 2020 10:17:34 +0000 (07:17 -0300)
This is the notmuch-tree version of
notmuch-show-archive-thread-then-exit

Signed-off-by: William Casarin <jb55@jb55.com>
emacs/notmuch-tree.el

index 02bdd1eef839bec159d300658815479f9e4a63c1..470cd517d4ade51698a90dafa55af1dc02075cab 100644 (file)
@@ -617,6 +617,12 @@ message will be \"unarchived\", i.e. the tag changes in
   (notmuch-tree-archive-message unarchive)
   (notmuch-tree-next-matching-message))
 
+(defun notmuch-tree-archive-thread-then-exit ()
+  "Archive all messages in the current buffer, then exit notmuch-tree."
+  (interactive)
+  (notmuch-tree-archive-thread)
+  (notmuch-tree-quit t))
+
 (defun notmuch-tree-archive-message-then-next-or-exit ()
   "Archive current message, then show next open message in current thread.