emacs: filter tag completions by current query

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>
This commit is contained in:
William Casarin 2018-10-08 04:47:52 -07:00 committed by David Bremner
parent baa4185c30
commit 0d0e2869b9

View file

@ -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