notmuch.el: Bring back the "End of search results." message.
authorCarl Worth <cworth@cworth.org>
Thu, 5 Nov 2009 22:18:44 +0000 (14:18 -0800)
committerCarl Worth <cworth@cworth.org>
Thu, 5 Nov 2009 22:18:44 +0000 (14:18 -0800)
The recent change of the hidden thread-ID syntax caused this message
to instead be replaced with a cryptic "search failed" error and an
internal regular expression. Put our nice message back.

notmuch.el

index de1eb9f1e1781ebc89694cdf50e3ddffeab28c3a..592c5ab58da2329806e99cbd695c1d713080db38 100644 (file)
@@ -674,15 +674,16 @@ global search.
   (save-excursion
     (beginning-of-line)
     (let ((beg (point)))
-      (re-search-forward "thread:[a-fA-F0-9]*")
+      (re-search-forward "thread:[a-fA-F0-9]*" nil t)
       (filter-buffer-substring beg (point)))))
 
 (defun notmuch-search-markup-this-thread-id ()
   (beginning-of-line)
   (let ((beg (point)))
-    (re-search-forward "thread:[a-fA-F0-9]*")
-    (forward-char)
-    (overlay-put (make-overlay beg (point)) 'invisible 'notmuch-search)))
+    (if (re-search-forward "thread:[a-fA-F0-9]*" nil t)
+       (progn
+         (forward-char)
+         (overlay-put (make-overlay beg (point)) 'invisible 'notmuch-search)))))
 
 (defun notmuch-search-markup-thread-ids ()
   (save-excursion