Add nm-sticky-tag-and-next function to set a tag, then tag things with it

This commit is contained in:
Adam Goldsmith 2019-02-14 21:42:20 -05:00
parent cee53bb0b8
commit 3c13316b78
1 changed files with 12 additions and 1 deletions

View File

@ -746,7 +746,8 @@
("s" . nm-spam)
("G" . nm-update-remote)
("j" . next-line)
("k" . previous-line))
("k" . previous-line)
("N" . nm-sticky-tag-and-next))
:config
(defun nm-tag-and-next (tags)
"Apply some changes to a message, then move to the next line"
@ -766,6 +767,16 @@
(interactive)
(shell-command "muchsync ag")
(nm-refresh))
(defvar nm-sticky-tags nil)
(defun nm-sticky-tag-and-next (tags)
(interactive
(if (or current-prefix-arg (null nm-sticky-tags))
(list (notmuch-tag-change-list (split-string
(read-string
"tags: " (mapconcat 'identity nm-sticky-tags " ")))))
(list nm-sticky-tags)))
(setq nm-sticky-tags tags)
(nm-tag-and-next tags))
(setq message-kill-buffer-on-exit t
mail-host-address "adamgoldsmith.name"