diff options
author | Mark Walters <markwalters1009@gmail.com> | 2013-06-30 09:55:10 +0100 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2013-07-04 00:36:19 -0300 |
commit | f9aad24f02af7e7b3810704f227ca1b8ef0c6229 (patch) | |
tree | da5177854d51b69122e8a83fc5796b60c93d4a70 /contrib/notmuch-pick/notmuch-pick.el | |
parent | 9a64b2df292858597c0bf632b8df69aa1dba07e4 (diff) |
contrib: pick: if no target specified go to first matching message
Diffstat (limited to 'contrib/notmuch-pick/notmuch-pick.el')
-rw-r--r-- | 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 16f8d15b..ef16ca75 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)))) |