]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: filter tag completions by current query
authorWilliam Casarin <jb55@jb55.com>
Mon, 8 Oct 2018 11:47:52 +0000 (04:47 -0700)
committerDavid Bremner <david@tethera.net>
Fri, 7 Dec 2018 01:22:40 +0000 (21:22 -0400)
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

index 1f453357e263fba23d517288541140796aaf4f74..804e78ab8c53cf855cd9a5ea3713f19b40da4886 100644 (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