From 494c74229bb8bdfc8571ce5de20a7beb0333c5f2 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 5 Nov 2009 10:23:04 -0800 Subject: notmuch show: Fix to work with any search string rather than just a thread ID. The more general command is more consistent, and more useful. We also fix "notmuch search" to output copy-and-pasteable search terms for the thread with "thread:" prepended already. Similarly, the message-ID in the output of "notmuch show" is also now printed as a valid search term, ("id:" rather than "ID: "). Naturally, the emacs code is also changed to track these changes. --- notmuch.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'notmuch.el') diff --git a/notmuch.el b/notmuch.el index a07b248b..b8d8e54f 100644 --- a/notmuch.el +++ b/notmuch.el @@ -65,8 +65,8 @@ (set 'notmuch-show-part-end-regexp " part}") (set 'notmuch-show-marker-regexp " \\(message\\|header\\|body\\|attachment\\|part\\)[{}].*$") -(set 'notmuch-show-id-regexp "ID: \\([^ ]*\\)") -(set 'notmuch-show-filename-regexp "Filename: \\(.*\\)$") +(set 'notmuch-show-id-regexp "id:\\([^ ]*\\)") +(set 'notmuch-show-filename-regexp "filename:\\(.*\\)$") (set 'notmuch-show-tags-regexp "(\\([^)]*\\))$") ; XXX: This should be a generic function in emacs somewhere, not here @@ -643,13 +643,13 @@ global search. (save-excursion (beginning-of-line) (let ((beg (point))) - (re-search-forward "[a-fA-F0-9]*") + (re-search-forward "thread:[a-fA-F0-9]*") (filter-buffer-substring beg (point))))) (defun notmuch-search-markup-this-thread-id () (beginning-of-line) (let ((beg (point))) - (re-search-forward "[a-fA-F0-9]*") + (re-search-forward "thread:[a-fA-F0-9]*") (forward-char) (overlay-put (make-overlay beg (point)) 'invisible 'notmuch-search))) -- cgit v1.2.3