Browse Source

Fix `org-make-tags-matcher'

* lisp/org.el (org-make-tags-matcher): With no filter, match everything.

Reported-by: Michael Strey <mstrey@strey.biz>
<http://permalink.gmane.org/gmane.emacs.orgmode/104729>
Nicolas Goaziou 9 years ago
parent
commit
cd9856cc76
1 changed files with 6 additions and 3 deletions
  1. 6 3
      lisp/org.el

+ 6 - 3
lisp/org.el

@@ -14464,9 +14464,12 @@ See also `org-scan-tags'."
 	  (setq todomatcher nil))
 	(setq todomatcher (cons 'or orlist))))
 
-    ;; Return the string and function of the matcher.
-    (let ((matcher (if todomatcher `(and ,tagsmatcher ,todomatcher)
-		     tagsmatcher)))
+    ;; Return the string and function of the matcher.  If no
+    ;; tags-specific or todo-specific matcher exists, match
+    ;; everything.
+    (let ((matcher (if (and tagsmatcher todomatcher)
+		       `(and ,tagsmatcher ,todomatcher)
+		     (or tagsmatcher todomatcher t))))
       (when org--matcher-tags-todo-only
 	(setq matcher `(and (member todo org-not-done-keywords) ,matcher)))
       (cons match0 `(lambda (todo tags-list level) ,matcher)))))