X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-message.el;h=d3738bf44e785193beb015fb12423829763b470e;hb=c3119c45e1b93a9d5a3925e9ecad70c886ca5064;hp=aefd3fbc7a5c3d7f53a9be1942f5c2bc142d8df9;hpb=d84e92709195d13a117d8f98847ff17f8ff2276c;p=notmuch diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el index aefd3fbc..d3738bf4 100644 --- a/emacs/notmuch-message.el +++ b/emacs/notmuch-message.el @@ -20,6 +20,7 @@ ;; Authors: Jesse Rosenthal (require 'message) +(require 'notmuch-tag) (require 'notmuch-mua) (defcustom notmuch-message-replied-tags '("replied") @@ -31,7 +32,7 @@ For example, if you wanted to add a \"replied\" tag and remove the \"inbox\" and \"todo\", you would set (\"replied\" \"-inbox\" \"-todo\"\)" :type 'list - :group 'notmuch) + :group 'notmuch-send) (defun notmuch-message-mark-replied () ;; get the in-reply-to header and parse it for the message id. @@ -39,12 +40,12 @@ the \"inbox\" and \"todo\", you would set (when (and notmuch-message-replied-tags rep) ;; add a "+" to any tag that is doesn't already begin with a "+" ;; or "-" - (let ((tags (mapcar '(lambda (str) - (if (not (string-match "^[+-]" str)) - (concat "+" str) - str)) + (let ((tags (mapcar (lambda (str) + (if (not (string-match "^[+-]" str)) + (concat "+" str) + str)) notmuch-message-replied-tags))) - (apply 'notmuch-tag (concat "id:" (car (car rep))) tags))))) + (funcall 'notmuch-tag (notmuch-id-to-query (car (car rep))) tags))))) (add-hook 'message-send-hook 'notmuch-message-mark-replied)