summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2020-01-20 16:51:36 +0100
committerBastien <bzg@gnu.org>2020-01-20 16:51:36 +0100
commit06cf532f475939a7a36b37b67429f130155e2349 (patch)
tree6063cbdf8799682f5b84432a3684227d1a721391
parent36cd249e75b967459fbfe63dc0c5f81bb73d51b7 (diff)
downloadorg-mode-06cf532f475939a7a36b37b67429f130155e2349.tar.gz
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.
-rw-r--r--lisp/org-agenda.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 2098cab..33ff3ff 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -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.