]> git.notmuchmail.org Git - notmuch/blobdiff - contrib/notmuch-pick/notmuch-pick.el
contrib: pick: bugfix when trying to show a non-message
[notmuch] / contrib / notmuch-pick / notmuch-pick.el
index be6a91a77b5325f70d5c93ea30a29a4083f2045c..db2a7cb94f7622285cc5d716cb5df966bb28d349 100644 (file)
@@ -241,7 +241,10 @@ Some useful entries are:
 
 (defun notmuch-pick-get-message-id ()
   "Return the message id of the current message."
 
 (defun notmuch-pick-get-message-id ()
   "Return the message id of the current message."
-  (concat "id:\"" (notmuch-pick-get-prop :id) "\""))
+  (let ((id (notmuch-pick-get-prop :id)))
+    (if id
+       (notmuch-id-to-query id)
+      nil)))
 
 (defun notmuch-pick-get-match ()
   "Return whether the current message is a match."
 
 (defun notmuch-pick-get-match ()
   "Return whether the current message is a match."