aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch.el
diff options
context:
space:
mode:
authorGravatar Jani Nikula <jani@nikula.org>2012-09-06 18:32:40 +0300
committerGravatar David Bremner <bremner@debian.org>2012-09-19 08:04:10 -0300
commitd5dcfc714e13256cb2084b30d3506a4abc990a51 (patch)
tree4da5e221ee4cbaa2b535d0ad25c7a5b104a9b19c /emacs/notmuch.el
parent2590d94bf0a1fc359b3b5463d4054d350324c891 (diff)
emacs: add support for custom tag changes on message/thread archive
Add support for customization of the tag changes that are applied when a message or a thread is archived. Instead of hard-coded removal of the "inbox" tag, the user can now specify a list of tag changes to perform.
Diffstat (limited to 'emacs/notmuch.el')
-rw-r--r--emacs/notmuch.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 1c43d3ee..64caa3ea 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -594,11 +594,19 @@ See `notmuch-tag' for information on the format of TAG-CHANGES."
(notmuch-search-tag "-"))
(defun notmuch-search-archive-thread ()
- "Archive the currently selected thread (remove its \"inbox\" tag).
+ "Archive the currently selected thread.
+
+Archive each message in the currently selected thread by applying
+the tag changes in `notmuch-archive-tags' to each (remove the
+\"inbox\" tag by default). If a prefix argument is given, the
+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)
- (notmuch-search-tag '("-inbox"))
+ (when notmuch-archive-tags
+ (notmuch-search-tag
+ (notmuch-tag-change-list notmuch-archive-tags)))
(notmuch-search-next-thread))
(defun notmuch-search-update-result (result &optional pos)