From: Mark Walters <markwalters1009@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH v3] contrib: pick: bugfix when trying to show a non-message
Date: Sat, 10 Nov 2012 17:02:18 +0000 [thread overview]
Message-ID: <1352566938-12473-1-git-send-email-markwalters1009@gmail.com> (raw)
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.
---
v2 is at id:1352562350-8219-1-git-send-email-markwalters1009@gmail.com
As suggested by bremner make the nil return from the if clause
explicit (as that is the point of the change).
contrib/notmuch-pick/notmuch-pick.el | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el
index 15ac5e8..4db9632 100644
--- a/contrib/notmuch-pick/notmuch-pick.el
+++ b/contrib/notmuch-pick/notmuch-pick.el
@@ -241,7 +241,10 @@ 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)
+ nil)))
(defun notmuch-pick-get-match ()
"Return whether the current message is a match."
--
1.7.9.1
next reply other threads:[~2012-11-10 17:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-10 17:02 Mark Walters [this message]
2012-11-16 19:47 ` [PATCH v3] contrib: pick: bugfix when trying to show a non-message David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1352566938-12473-1-git-send-email-markwalters1009@gmail.com \
--to=markwalters1009@gmail.com \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).