unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] emacs: filter tag completions by current query
@ 2018-10-08 11:47 William Casarin
  2018-10-08 12:14 ` David Edmondson
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: William Casarin @ 2018-10-08 11:47 UTC (permalink / raw)
  To: notmuch

When filtering by tags in notmuch-search-filter-by-tag, only return tags
related to the current query.

Before, it was returning all tags. There's no reason to refine the
current query with tags that don't exist in the current result set.

Signed-off-by: William Casarin <jb55@jb55.com>
---
 emacs/notmuch.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 44402f8a..28c50425 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -1076,7 +1076,7 @@ current search results AND the additional query string provided."
 Runs a new search matching only messages that match both the
 current search results AND that are tagged with the given tag."
   (interactive
-   (list (notmuch-select-tag-with-completion "Filter by tag: ")))
+   (list (notmuch-select-tag-with-completion "Filter by tag: " notmuch-search-query-string)))
   (notmuch-search (concat notmuch-search-query-string " and tag:" tag) notmuch-search-oldest-first))
 
 ;;;###autoload
-- 
2.19.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-12-07  1:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-08 11:47 [PATCH] emacs: filter tag completions by current query William Casarin
2018-10-08 12:14 ` David Edmondson
2018-10-08 12:46   ` Jeff Templon
2018-10-08 13:01     ` David Edmondson
2018-10-08 13:14       ` Jeff Templon
2018-10-08 13:29         ` David Edmondson
2018-10-08 15:24           ` David Bremner
2018-11-24 20:52 ` William Casarin
2018-12-07  1:26 ` David Bremner

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).