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

View File

@ -746,7 +746,8 @@
("s" . nm-spam) ("s" . nm-spam)
("G" . nm-update-remote) ("G" . nm-update-remote)
("j" . next-line) ("j" . next-line)
("k" . previous-line)) ("k" . previous-line)
("N" . nm-sticky-tag-and-next))
:config :config
(defun nm-tag-and-next (tags) (defun nm-tag-and-next (tags)
"Apply some changes to a message, then move to the next line" "Apply some changes to a message, then move to the next line"
@ -766,6 +767,16 @@
(interactive) (interactive)
(shell-command "muchsync ag") (shell-command "muchsync ag")
(nm-refresh)) (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 (setq message-kill-buffer-on-exit t
mail-host-address "adamgoldsmith.name" mail-host-address "adamgoldsmith.name"