]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-message.el
emacs: fix notmuch-message-replied-tags defcustom type
[notmuch] / emacs / notmuch-message.el
index aefd3fbc7a5c3d7f53a9be1942f5c2bc142d8df9..3798046eb7c84c5ecedc204a984a4cb43fc72e5f 100644 (file)
@@ -20,6 +20,7 @@
 ;; Authors: Jesse Rosenthal <jrosenthal@jhu.edu>
 
 (require 'message)
+(require 'notmuch-tag)
 (require 'notmuch-mua)
 
 (defcustom notmuch-message-replied-tags '("replied")
@@ -30,8 +31,8 @@ if it is prefaced with a \"-\", removed.
 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)
+  :type '(repeat string)
+  :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)