]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch.el
notmuch.el: Simplify get-message-id
[notmuch] / notmuch.el
index c8639be529207fc85420e25be527712b590a1348..34e439422cdb5415eba37638c0ff8f980b2b3cd6 100644 (file)
@@ -68,7 +68,7 @@
 (set 'notmuch-show-part-end-regexp         "\fpart}")
 (set 'notmuch-show-marker-regexp "\f\\(message\\|header\\|body\\|attachment\\|part\\)[{}].*$")
 
-(set 'notmuch-show-id-regexp "id:\\([^ ]*\\)")
+(set 'notmuch-show-id-regexp "\\(id:[^ ]*\\)")
 (set 'notmuch-show-filename-regexp "filename:\\(.*\\)$")
 (set 'notmuch-show-tags-regexp "(\\([^)]*\\))$")
 
@@ -153,7 +153,7 @@ Unlike builtin `next-line' this version accepts no arguments."
   (apply 'notmuch-call-notmuch-process
         (append (cons "tag"
                       (mapcar (lambda (s) (concat "+" s)) toadd))
-                (cons (concat "id:" (notmuch-show-get-message-id)) nil)))
+                (cons (notmuch-show-get-message-id) nil)))
   (notmuch-show-set-tags (sort (union toadd (notmuch-show-get-tags) :test 'string=) 'string<)))
 
 (defun notmuch-show-remove-tag (&rest toremove)
@@ -165,7 +165,7 @@ Unlike builtin `next-line' this version accepts no arguments."
          (apply 'notmuch-call-notmuch-process
                 (append (cons "tag"
                               (mapcar (lambda (s) (concat "-" s)) toremove))
-                        (cons (concat "id:" (notmuch-show-get-message-id)) nil)))
+                        (cons (notmuch-show-get-message-id) nil)))
          (notmuch-show-set-tags (sort (set-difference tags toremove :test 'string=) 'string<))))))
 
 (defun notmuch-show-archive-thread-maybe-mark-read (markread)