mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
emacs: Match entire saved-search when computing search-view buffer name
I happen to have a lot of saved searches that are variants of the tag:inbox search, (such as "tag:inbox and tag:notmuch"). The logic for these was always matching inbox first, resulting in "[ inbox ] and tag:notmuch" rather than "notmuch" as desired. Anchor the regular expression on both ends to make it look harder for the better match.
This commit is contained in:
parent
a466921760
commit
f2ebe3ac44
1 changed files with 1 additions and 1 deletions
|
@ -663,7 +663,7 @@ characters as well as `_.+-'.
|
||||||
(defun notmuch-search-buffer-title (query)
|
(defun notmuch-search-buffer-title (query)
|
||||||
"Returns the title for a buffer with notmuch search results."
|
"Returns the title for a buffer with notmuch search results."
|
||||||
(let* ((folder (rassoc-if (lambda (key)
|
(let* ((folder (rassoc-if (lambda (key)
|
||||||
(string-match (concat "^" (regexp-quote key))
|
(string-match (concat "^" (regexp-quote key) "$")
|
||||||
query))
|
query))
|
||||||
(notmuch-saved-searches)))
|
(notmuch-saved-searches)))
|
||||||
(folder-name (car folder))
|
(folder-name (car folder))
|
||||||
|
|
Loading…
Reference in a new issue