emacs: call notmuch-show instead of notmuch-search in buttonised id: links

Since message-ids necessarily match just a single message, there's no
reason to do a search for the id before viewing the actual message;
the search just becomes an extra screen to click through.  Clicking on
an id: links now just jumps straight to the message itself.
This commit is contained in:
Jameson Graef Rollins 2011-12-22 20:59:12 -08:00 committed by David Bremner
parent 824dad76b6
commit c0d694035d

View file

@ -803,7 +803,7 @@ a corresponding notmuch search."
(remove-overlays (match-beginning 0) (match-end 0) 'goto-address t) (remove-overlays (match-beginning 0) (match-end 0) 'goto-address t)
(make-text-button (match-beginning 0) (match-end 0) (make-text-button (match-beginning 0) (match-end 0)
'action `(lambda (arg) 'action `(lambda (arg)
(notmuch-search ,(match-string-no-properties 0))) (notmuch-show ,(match-string-no-properties 0)))
'follow-link t 'follow-link t
'help-echo "Mouse-1, RET: search for this message" 'help-echo "Mouse-1, RET: search for this message"
'face goto-address-mail-face)))) 'face goto-address-mail-face))))