]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: add support for reversing notmuch-search-archive-thread tag changes
authorJani Nikula <jani@nikula.org>
Thu, 6 Sep 2012 15:32:41 +0000 (18:32 +0300)
committerDavid Bremner <bremner@debian.org>
Wed, 19 Sep 2012 11:05:59 +0000 (08:05 -0300)
Since archiving a thread can now be a user customized set of tag
changes, make reversing this easier. Allow a prefix argument to
notmuch-search-archive-thread to reverse the archiving, similar to the
unarchiving in notmuch-show-archive-message.

emacs/notmuch.el

index 64caa3eaf2e5a9b73c79b38634ba9f398d9ff083..a8a85ce7839d11a9e5fce04d85da57481a51f45e 100644 (file)
@@ -593,7 +593,7 @@ See `notmuch-tag' for information on the format of TAG-CHANGES."
   (interactive)
   (notmuch-search-tag "-"))
 
-(defun notmuch-search-archive-thread ()
+(defun notmuch-search-archive-thread (&optional unarchive)
   "Archive the currently selected thread.
 
 Archive each message in the currently selected thread by applying
@@ -603,10 +603,10 @@ messages will be \"unarchived\" (i.e. the tag changes in
 `notmuch-archive-tags' will be reversed).
 
 This function advances the next thread when finished."
-  (interactive)
+  (interactive "P")
   (when notmuch-archive-tags
     (notmuch-search-tag
-     (notmuch-tag-change-list notmuch-archive-tags)))
+     (notmuch-tag-change-list notmuch-archive-tags unarchive)))
   (notmuch-search-next-thread))
 
 (defun notmuch-search-update-result (result &optional pos)