From 06cf532f475939a7a36b37b67429f130155e2349 Mon Sep 17 00:00:00 2001 From: Bastien Date: Mon, 20 Jan 2020 16:51:36 +0100 Subject: [PATCH] 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. --- lisp/org-agenda.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 2098cab4b..33ff3ff16 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.