Add nm-spam and binding

This commit is contained in:
Adam Goldsmith 2018-11-20 11:58:45 -05:00
parent bcb8828b96
commit 9719dd00de
1 changed files with 11 additions and 3 deletions

View File

@ -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)