]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: tree: bare-id in tree
authorMark Walters <markwalters1009@gmail.com>
Thu, 19 Dec 2013 19:16:51 +0000 (19:16 +0000)
committerDavid Bremner <david@tethera.net>
Fri, 3 Jan 2014 11:12:28 +0000 (07:12 -0400)
Previously notmuch-tree-get-message-id always returned the id
including the prefix "id:". Modify the function to take an optional
`bare' argument saying to return the raw string.

This will be useful later and brings the function in line with
notmuch-show-get-message-id.

emacs/notmuch-tree.el

index 8d59e65f6396ffedd5ef409c5c671d6b016ca883..1dde9a7af91c128886821823795e36ce772fd54d 100644 (file)
@@ -319,11 +319,13 @@ correct message properties."
   "Return the tags of the current message."
   (notmuch-tree-get-prop :tags))
 
-(defun notmuch-tree-get-message-id ()
+(defun notmuch-tree-get-message-id (&optional bare)
   "Return the message id of the current message."
   (let ((id (notmuch-tree-get-prop :id)))
     (if id
-       (notmuch-id-to-query id)
+       (if bare
+           id
+         (notmuch-id-to-query id))
       nil)))
 
 (defun notmuch-tree-get-match ()