X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch.el;h=57e11400a526cf4b81433430d1ce0f65245f989d;hb=b749bd5390ce8b478de202495574c441dd875edf;hp=ba9bbdad7814407e1baf41c1d0b3d77c736fc522;hpb=6731ab1037aecb022ed593e6ae306a042b58dbb8;p=notmuch diff --git a/emacs/notmuch.el b/emacs/notmuch.el index ba9bbdad..57e11400 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -56,6 +56,7 @@ (require 'notmuch-mua) (require 'notmuch-hello) (require 'notmuch-maildir-fcc) +(require 'notmuch-message) (defcustom notmuch-search-result-format `(("date" . "%s ") @@ -663,9 +664,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))