summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-04-26 22:58:46 -0700
committerCarl Worth <cworth@cworth.org>2010-04-26 22:58:46 -0700
commit6731ab1037aecb022ed593e6ae306a042b58dbb8 (patch)
tree4d8dc0b311bb6310f0a36cba1c5ba8adf68dfd03
parentf2ebe3ac446afda9ced6507dc391865464ccdcaa (diff)
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.
-rw-r--r--emacs/notmuch.el24
1 files changed, 12 insertions, 12 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 27e3a40..ba9bbda 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -662,19 +662,19 @@ characters as well as `_.+-'.
(defun notmuch-search-buffer-title (query)
"Returns the title for a buffer with notmuch search results."
- (let* ((folder (rassoc-if (lambda (key)
- (string-match (concat "^" (regexp-quote key) "$")
- query))
- (notmuch-saved-searches)))
- (folder-name (car folder))
- (folder-query (cdr folder)))
- (cond ((and folder (equal folder-query query))
- ;; Query is the same as folder search (ignoring case)
- (concat "*notmuch-folder-" folder-name "*"))
- (folder
+ (let* ((saved-search (rassoc-if (lambda (key)
+ (string-match (concat "^" (regexp-quote key) "$")
+ query))
+ (notmuch-saved-searches)))
+ (saved-search-name (car saved-search))
+ (saved-search-query (cdr saved-search)))
+ (cond ((and saved-search (equal saved-search-query query))
+ ;; Query is the same as saved search (ignoring case)
+ (concat "*notmuch-saved-search-" saved-search-name "*"))
+ (saved-search
(concat "*notmuch-search-"
- (replace-regexp-in-string (concat "^" (regexp-quote folder-query))
- (concat "[ " folder-name " ]")
+ (replace-regexp-in-string (concat "^" (regexp-quote saved-search-query))
+ (concat "[ " saved-search-name " ]")
query)
"*"))
(t