[PATCH 1/4 v2] emacs: add show-mode functions to archive/delete only current message

Jameson Graef Rollins jrollins at finestructure.net
Sun Jan 8 11:09:09 PST 2012


This adds two new function, notmuch-show-{archive,delete}-message,
that archive/delete the current message, and then move to the next
open one.
---
Sorry, there were some errant extra parens at the end of these
function definitions.

 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..b2e7829 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



More information about the notmuch mailing list