org-agenda.el: Fix bug when using category filters

* lisp/org-agenda.el (org-agenda-filter-make-matcher): Use `or'
for category filters, `and' for other filters.

For example, when using `org-agenda-category-filter-preset' set to
'("+cat1" "+cat2"), using `and' in the filter matcher results in
displaying 0 headline, since no headline can have two categories.
This commit is contained in:
Bastien 2020-01-20 16:51:36 +01:00
parent 36cd249e75
commit 06cf532f47
1 changed files with 1 additions and 1 deletions

View File

@ -7926,7 +7926,7 @@ tags in the FILTER if any of the tags in FILTER are grouptags."
filter)))
(dolist (x filter)
(push (org-agenda-filter-effort-form x) f))))
(cons 'and (nreverse f))))
(cons (if (eq type 'category) 'or 'and) (nreverse f))))
(defun org-agenda-filter-make-matcher-tag-exp (tags op)
"Return a form associated to tag-expression TAGS.