Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: > Unfortunately, no one volunteered to fix the issue so far. You may want > to have a look at it, you will certainly get help doing so. Otherwise, > you are welcome to bump the report from time to time.
This bisects to 7e52b7661 (org-agenda: Fix logic of `org-agenda-filter-make-matcher', 2020-02-19). Jorge, I tested the patch below against the test case you provided, though of course confirmation that it resolves the issue on your end would be appreciated. I'll apply it tomorrow unless there are objections. -- >8 -- Subject: [PATCH] agenda: Fix regression in handling of non-caterory filters * lisp/org-agenda.el (org-agenda-filter-make-matcher): Combine filter forms with `and' unless multiple positive categories are given. 06cf532f4 (org-agenda.el: Fix bug when using category filters, 2020-01-20) modified org-agenda-filter-make-matcher to group the form with `or' rather than `and' for category filters. This logic was tweaked again in a follow-up commit, 7e52b7661 (org-agenda: Fix logic of `org-agenda-filter-make-matcher', 2020-02-19), which was supposed to restrict the use of `or' to _multiple_ positive categories. However, the follow-up commit incorrectly affected all filter types. Avoid the check for non-category types. Also, fix the regexp so that it matches whenever there are multiple positive categories, not just a single one. --- * I'm tempted to drop the multi-pos-cats binding and move the expression in line. I may do that before applying. * I'm not really sure what the behavior should be when there are multiple "+"s and at least one "-". I doubt that there's much sensible to do here, or that it matters one way or the other. lisp/org-agenda.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index d89a3da7c..ffb892b0c 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7948,8 +7948,10 @@ (defun org-agenda-filter-make-matcher (filter type &optional expand) argument EXPAND can be used for the TYPE tag and will expand the tags in the FILTER if any of the tags in FILTER are grouptags." (let ((multi-pos-cats - (string-match-p "\++" - (mapconcat (lambda (cat) (substring cat 0 1)) filter ""))) + (and (eq type 'category) + (string-match-p "\\+.*\\+" + (mapconcat (lambda (cat) (substring cat 0 1)) + filter "")))) f f1) (cond ;; Tag filter -- 2.26.0