[PATCH v2] contrib: pick: bugfix when trying to show a non-message

Mark Walters markwalters1009 at gmail.com
Sat Nov 10 07:45:50 PST 2012


If the user pressed return on the end result status line it gave a
blank message. Modify the function notmuch-pick-get-message-id to
return nil rather than an empty message-id in this case to fix this.

This also fixes a bug in the (lack of) quoting of the id string.
---

Version 1 is at
id:1351797983-19707-1-git-send-email-markwalters1009 at gmail.com

This version changes the `when' to and `if' and adds the fix for the
quoting.

Best wishes

Mark

 contrib/notmuch-pick/notmuch-pick.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el
index 15ac5e8..bbfa6fb 100644
--- a/contrib/notmuch-pick/notmuch-pick.el
+++ b/contrib/notmuch-pick/notmuch-pick.el
@@ -241,7 +241,9 @@ Some useful entries are:
 
 (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))))
 
 (defun notmuch-pick-get-match ()
   "Return whether the current message is a match."
-- 
1.7.9.1



More information about the notmuch mailing list