[PATCH] Function to apply many tags in notmuch-search-mode

Tim Bielawa tbielawa at redhat.com
Wed Mar 7 14:49:03 PST 2012


Add a function for applying an arbitrary number of tags to the
highlighted message thread while in notmuch-search-mode. Intended to
restore the original functionality of notmuch-search-remove-tag and
notmuch-search-add-tag prior to 2beaefa2.
---
 emacs/notmuch.el |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 99e0c93..b731c7c 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -663,6 +663,15 @@ added or removed for all threads in the region from BEG to END."
   (interactive)
   (notmuch-search-tag "-"))
 
+(defun notmuch-search-tag-and-advance (&rest tags)
+  "Apply a tag or set of tags to the current thread.
+
+Shortcut to simplify applying tags in search mode. Targeted for
+use in key-bound functions. Advances to the next thread after
+applying the tags."
+  (mapc 'notmuch-search-tag-thread tags)
+  (notmuch-search-next-thread))
+
 (defun notmuch-search-archive-thread ()
   "Archive the currently selected thread (remove its \"inbox\" tag).
 
-- 
1.7.4.4



More information about the notmuch mailing list