浏览代码

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.
Bastien 5 年之前
父节点
当前提交
06cf532f47
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lisp/org-agenda.el

+ 1 - 1
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.