mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 10:58:10 +01:00
emacs: Rename search buffers with "saved-search" not "folder"
Since we recently renamed everything from notmuch-folders to notmuch-saved-searches, fix up the generated names in the search buffers to match.
This commit is contained in:
parent
f2ebe3ac44
commit
6731ab1037
1 changed files with 12 additions and 12 deletions
|
@ -662,19 +662,19 @@ 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* ((saved-search (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))
|
(saved-search-name (car saved-search))
|
||||||
(folder-query (cdr folder)))
|
(saved-search-query (cdr saved-search)))
|
||||||
(cond ((and folder (equal folder-query query))
|
(cond ((and saved-search (equal saved-search-query query))
|
||||||
;; Query is the same as folder search (ignoring case)
|
;; Query is the same as saved search (ignoring case)
|
||||||
(concat "*notmuch-folder-" folder-name "*"))
|
(concat "*notmuch-saved-search-" saved-search-name "*"))
|
||||||
(folder
|
(saved-search
|
||||||
(concat "*notmuch-search-"
|
(concat "*notmuch-search-"
|
||||||
(replace-regexp-in-string (concat "^" (regexp-quote folder-query))
|
(replace-regexp-in-string (concat "^" (regexp-quote saved-search-query))
|
||||||
(concat "[ " folder-name " ]")
|
(concat "[ " saved-search-name " ]")
|
||||||
query)
|
query)
|
||||||
"*"))
|
"*"))
|
||||||
(t
|
(t
|
||||||
|
|
Loading…
Reference in a new issue