unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] contrib: pick: if no target specified go to first matching message
@ 2013-05-26  6:40 Mark Walters
  0 siblings, 0 replies; only message in thread
From: Mark Walters @ 2013-05-26  6:40 UTC (permalink / raw)
  To: notmuch

---

Now that all the plumbing
(id:1357814477-1348-1-git-send-email-markwalters1009@gmail.com) is in
place this is easy.

Best wishes

Mark

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

diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el
index 128fabf..b7e9515 100644
--- a/contrib/notmuch-pick/notmuch-pick.el
+++ b/contrib/notmuch-pick/notmuch-pick.el
@@ -652,8 +652,10 @@ unchanged ADDRESS if parsing fails."
   (save-excursion
     (goto-char (point-max))
     (notmuch-pick-insert-msg msg))
-  (let ((msg-id (notmuch-id-to-query (plist-get msg :id))))
-    (when (string= msg-id notmuch-pick-target-msg)
+  (let ((msg-id (notmuch-id-to-query (plist-get msg :id)))
+	(target notmuch-pick-target-msg))
+    (when (or (and (not target) (plist-get msg :match))
+	      (string= msg-id target))
       (setq notmuch-pick-target-msg "found")
       (goto-char (point-max))
       (forward-line -1))))
-- 
1.7.9.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-05-26  6:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-26  6:40 [PATCH] contrib: pick: if no target specified go to first matching message Mark Walters

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).