diff options
| author | Kristoffer Balintona <krisbalintona@gmail.com> | 2025-11-13 14:39:14 -0600 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2026-01-25 08:15:12 +0900 |
| commit | 07bb294049e786d1cf6fe07c6bef589826edb973 (patch) | |
| tree | 85f25c990ad0d586eaee77189958157ed44da087 /emacs | |
| parent | 96174beba63c80a8fb73c1e78e81d04e60e5e6f3 (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')
| -rw-r--r-- | emacs/notmuch-tree.el | 2 | ||||
| -rw-r--r-- | emacs/notmuch.el | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index aa0d92a7..7c4b6d8f 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -1308,7 +1308,7 @@ search results and that are also tagged with the given TAG." notmuch-tree-basic-query))) (let ((notmuch-show-process-crypto (notmuch-tree--message-process-crypto))) (notmuch-tree-close-message-window) - (notmuch-tree (concat notmuch-tree-basic-query " and tag:" tag) + (notmuch-tree (format "(%s) and tag:%s" notmuch-tree-basic-query tag) notmuch-tree-query-context nil nil 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)) |
