+ The notmuch-{search,show}-{add,remove}-tag functions are very useful
+ for making quick tag key bindings. For instance, here's an example
+ of how to make a key binding to add the "spam" tag and remove the
+ "inbox" tag in notmuch-show-mode:
+
+ (define-key notmuch-show-mode-map "S"
+ (lambda ()
+ "mark message as spam"
+ (interactive)
+ (notmuch-show-add-tag "spam")
+ (notmuch-show-remove-tag "inbox")))
+
+ You can do the same for threads in notmuch-search-mode by just
+ replacing "show" with "search" in the called functions.
+
+ The definition above makes use of a lambda function, but you could
+ also define a separate function first:
+
+ (defun notmuch-show-tag-spam()
+ "mark message as spam"
+ (interactive)
+ (notmuch-show-add-tag "spam")
+ (notmuch-show-remove-tag "inbox")))
+ (define-key notmuch-show-mode-map "S" 'notmuch-show-tag-spam)
+
+ Here's a more complicated example of how to add a toggle "deleted"
+ key: