This adds two new function, notmuch-show-{archive,delete}-message,
that archive/delete the current message, and then move to the next
open one.
---
 emacs/notmuch-show.el |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index e1d15f4..8bb052e 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1436,6 +1436,18 @@ argument, hide all of the messages."
            (if show-next
                (notmuch-search-show-thread)))))))

+(defun notmuch-show-archive-message ()
+  "Archive the current message and advance.
+
+After the last message is reached, either the buffer will be
+closed and the cursor will move to the search result if
+available, or the cursor will move to the end of the current
+thread.
+"
+    (interactive)
+    (notmuch-show-remove-tag "inbox")
+    (notmuch-show-next-open-message)))
+
 (defun notmuch-show-archive-thread ()
   "Archive each message in thread, then show next thread from search.

@@ -1455,6 +1467,18 @@ buffer."
   (interactive)
   (notmuch-show-tag-thread-internal "-" "inbox" nil))

+(defun notmuch-show-delete-message ()
+  "Delete the current message and advance.
+
+After the last message is reached, either the buffer will be
+closed and the cursor will move to the search result if
+available, or the cursor will move to the end of the current
+thread.
+"
+    (interactive)
+    (notmuch-show-add-tag "deleted")
+    (notmuch-show-next-open-message)))
+
 (defun notmuch-show-delete-thread ()
   "Delete each message in thread, then show next thread from search.

-- 
1.7.7.3

Reply via email to