Add nm-spam and binding

This commit is contained in:
Adam Goldsmith 2018-11-20 11:58:45 -05:00
parent bcb8828b96
commit 9719dd00de

View File

@ -713,14 +713,22 @@
:quelpa (nm :fetcher github :repo "ad1217/nevermore" :branch "fix-deleted") :quelpa (nm :fetcher github :repo "ad1217/nevermore" :branch "fix-deleted")
:bind (:map nm-mode-map :bind (:map nm-mode-map
("n" . nm-read) ("n" . nm-read)
("s" . nm-spam)
("G" . nm-update-remote)) ("G" . nm-update-remote))
:config :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 () (defun nm-read ()
"Mark message as read." "Mark message as read."
(interactive) (interactive)
(nm-apply-to-result (lambda (q) (notmuch-tag q '("-unread")))) (nm-tag-and-next '("-unread")))
(nm-update-tags) (defun nm-spam ()
(forward-line)) "Mark message as read."
(interactive)
(nm-tag-and-next '("+spam" "-unread" "-inbox")))
(defun nm-update-remote () (defun nm-update-remote ()
"Pull email from remote mailbox" "Pull email from remote mailbox"
(interactive) (interactive)