Home / Emacs / Notmuch Show
My tagging
Replace the tagging interface with a simple unread and spam toggle.
(with-eval-after-load 'notmuch
(defun my-notmuch-show-toggle-unread ()
"Toggle unread tag and advance to next message."
(interactive)
(notmuch-show-tag
(list (if (member "unread" (notmuch-show-get-tags))
"-unread" "+unread")))
(notmuch-show-next-message))
(defun my-notmuch-show-toggle-spam ()
"Toggle spam tag and advance to next message."
(interactive)
(notmuch-show-tag
(if (member "spam" (notmuch-show-get-tags))
'("-spam" "+unread") '("+spam" "-unread")))
(notmuch-show-next-message))
(keymap-set notmuch-show-mode-map "k" #'my-notmuch-show-toggle-unread)
(keymap-set notmuch-show-mode-map "K" #'my-notmuch-show-toggle-spam))