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.
(interactive)
(notmuch-search-tag "-"))
(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
"Archive the currently selected thread.
Archive each message in the currently selected thread by applying
`notmuch-archive-tags' will be reversed).
This function advances the next thread when finished."
`notmuch-archive-tags' will be reversed).
This function advances the next thread when finished."
(when notmuch-archive-tags
(notmuch-search-tag
(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)
(notmuch-search-next-thread))
(defun notmuch-search-update-result (result &optional pos)