diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 1c42065..0a56f66 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -713,14 +713,22 @@ :quelpa (nm :fetcher github :repo "ad1217/nevermore" :branch "fix-deleted") :bind (:map nm-mode-map ("n" . nm-read) + ("s" . nm-spam) ("G" . nm-update-remote)) :config + (defun nm-tag-and-next (tags) + "Apply some changes to a message, then move to the next line" + (nm-apply-to-result (lambda (q) (notmuch-tag q tags))) + (nm-update-tags) + (forward-line)) (defun nm-read () "Mark message as read." (interactive) - (nm-apply-to-result (lambda (q) (notmuch-tag q '("-unread")))) - (nm-update-tags) - (forward-line)) + (nm-tag-and-next '("-unread"))) + (defun nm-spam () + "Mark message as read." + (interactive) + (nm-tag-and-next '("+spam" "-unread" "-inbox"))) (defun nm-update-remote () "Pull email from remote mailbox" (interactive)