summaryrefslogtreecommitdiff
path: root/emacs/notmuch.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/notmuch.el')
-rw-r--r--emacs/notmuch.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index ba9bbda..488458a 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -663,9 +663,9 @@ characters as well as `_.+-'.
(defun notmuch-search-buffer-title (query)
"Returns the title for a buffer with notmuch search results."
(let* ((saved-search (rassoc-if (lambda (key)
- (string-match (concat "^" (regexp-quote key) "$")
+ (string-match (concat "^" (regexp-quote key))
query))
- (notmuch-saved-searches)))
+ (reverse (notmuch-saved-searches))))
(saved-search-name (car saved-search))
(saved-search-query (cdr saved-search)))
(cond ((and saved-search (equal saved-search-query query))