* [PATCH] Try to provide search buffers with titles from notmuch-folders.
@ 2010-04-15 12:16 Servilio Afre Puentes
2010-04-15 13:42 ` David Bremner
2010-04-19 4:02 ` Servilio Afre Puentes
0 siblings, 2 replies; 3+ messages in thread
From: Servilio Afre Puentes @ 2010-04-15 12:16 UTC (permalink / raw)
To: notmuch
---
emacs/notmuch.el | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index be09f42..17e0e86 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -696,6 +696,15 @@ characters as well as `_.+-'.
(apply 'notmuch-call-notmuch-process "tag"
(append action-split (list notmuch-search-query-string) nil))))
+(defun notmuch-search-buffer-title (query)
+ "Returns the title for a buffer with notmuch search results."
+ (let ((folder (car (rassoc query notmuch-folders))))
+ (if folder
+ (concat "*notmuch-folder-" folder "*")
+ (concat "*notmuch-search-" query "*"))
+ )
+)
+
;;;###autoload
(defun notmuch-search (query &optional oldest-first target-thread target-line)
"Run \"notmuch search\" with the given query string and display results.
@@ -708,7 +717,7 @@ The optional parameters are used as follows:
target-line: The line number to move to if the target thread does not
appear in the search results."
(interactive "sNotmuch search: ")
- (let ((buffer (get-buffer-create (concat "*notmuch-search-" query "*"))))
+ (let ((buffer (get-buffer-create (notmuch-search-buffer-title query))))
(switch-to-buffer buffer)
(notmuch-search-mode)
(set 'notmuch-search-query-string query)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Try to provide search buffers with titles from notmuch-folders.
2010-04-15 12:16 [PATCH] Try to provide search buffers with titles from notmuch-folders Servilio Afre Puentes
@ 2010-04-15 13:42 ` David Bremner
2010-04-19 4:02 ` Servilio Afre Puentes
1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2010-04-15 13:42 UTC (permalink / raw)
To: Servilio Afre Puentes, notmuch
On Thu, 15 Apr 2010 08:16:09 -0400, Servilio Afre Puentes <servilio@gmail.com> wrote:
> ---
> emacs/notmuch.el | 11 ++++++++++-
> 1 files changed, 10 insertions(+), 1 deletions(-)
>
Thanks very much for the contribution. It would be nice (and Carl will
almost certainly ask for this) to have a meaningful commit message.
All the best
David
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Try to provide search buffers with titles from notmuch-folders.
2010-04-15 12:16 [PATCH] Try to provide search buffers with titles from notmuch-folders Servilio Afre Puentes
2010-04-15 13:42 ` David Bremner
@ 2010-04-19 4:02 ` Servilio Afre Puentes
1 sibling, 0 replies; 3+ messages in thread
From: Servilio Afre Puentes @ 2010-04-19 4:02 UTC (permalink / raw)
To: notmuch
This patch has been obsoleted by the one sent in message:
x2hb22065d01004182055vc111d42az357076f93b6cb72a@mail.gmail.com
Servilio
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-04-19 4:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-15 12:16 [PATCH] Try to provide search buffers with titles from notmuch-folders Servilio Afre Puentes
2010-04-15 13:42 ` David Bremner
2010-04-19 4:02 ` Servilio Afre Puentes
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).