aboutsummaryrefslogtreecommitdiff
path: root/emacs/notmuch.el
diff options
context:
space:
mode:
authorKristoffer Balintona <krisbalintona@gmail.com>2025-11-13 14:39:14 -0600
committerDavid Bremner <david@tethera.net>2026-01-25 08:15:12 +0900
commit07bb294049e786d1cf6fe07c6bef589826edb973 (patch)
tree85f25c990ad0d586eaee77189958157ed44da087 /emacs/notmuch.el
parent96174beba63c80a8fb73c1e78e81d04e60e5e6f3 (diff)
emacs: fix `notmuch-*-filter-by-tag' query strings
`notmuch-tree-filter-by-tag' and `notmuch-search-filter-by-tag' are described, in their docstrings, as matching all the messages in the current view that are ALSO tagged by a given tag. However, since the current view's search query was not logically grouped together (with parentheses), the actual behavior was different for sufficiently complex search queries. Fix this by grouping the current view's search query in parentheses first.
Diffstat (limited to 'emacs/notmuch.el')
-rw-r--r--emacs/notmuch.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 69aff347..c61c263d 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -1192,7 +1192,7 @@ search results and that are also tagged with the given TAG."
(interactive
(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 (format "(%s) and tag:%s" notmuch-search-query-string tag)
notmuch-search-oldest-first
notmuch-search-hide-excluded))