]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-lib.el
emacs: add support for custom tag changes on message/thread archive
[notmuch] / emacs / notmuch-lib.el
index 30db58ffbff32c2d703c22f3a21427402a08b20d..20d990dfc19ab73d2c49e6c2436af19c161ac7bd 100644 (file)
@@ -24,7 +24,7 @@
 (require 'mm-view)
 (require 'mm-decode)
 (require 'json)
-(eval-when-compile (require 'cl))
+(require 'cl)
 
 (defvar notmuch-command "notmuch"
   "Command to run the notmuch binary.")
   :type '(alist :key-type string :value-type string)
   :group 'notmuch-hello)
 
+(defcustom notmuch-archive-tags '("-inbox")
+  "List of tag changes to apply to a message or a thread when it is archived.
+
+Tags starting with \"+\" (or not starting with either \"+\" or
+\"-\") in the list will be added, and tags starting with \"-\"
+will be removed from the message or thread being archived.
+
+For example, if you wanted to remove an \"inbox\" tag and add an
+\"archived\" tag, you would set:
+    (\"-inbox\" \"+archived\")"
+  :type '(repeat string)
+  :group 'notmuch-search
+  :group 'notmuch-show)
+
 (defvar notmuch-folders nil
   "Deprecated name for what is now known as `notmuch-saved-searches'.")