summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-08-17 15:16:07 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-08-17 15:16:07 +0200
commit2fb129b5c7d8da924f02217f83be1254d86720eb (patch)
tree2cea37131c6fe5f6e3883b2a000d74c0eb7e42ad
parentdb0ef4d06e7025b5e9241df794313a7221f82035 (diff)
downloadorg-mode-2fb129b5c7d8da924f02217f83be1254d86720eb.tar.gz
`org-scan-tags' retrieve all TODO keywords, not only not-done ones
* lisp/org.el (org-scan-tags): Retrieve all TODO keywords. DONE keywords can be filtered using "/!" matcher syntax or equivalent. Reported-by: Julien Cubizolles <j.cubizolles@free.fr> <http://lists.gnu.org/archive/html/emacs-orgmode/2017-08/msg00367.html>
-rw-r--r--etc/ORG-NEWS5
-rw-r--r--lisp/org.el8
2 files changed, 9 insertions, 4 deletions
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 96c8f52..a7deb3c 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -93,6 +93,11 @@ See docstring for changes.
the string displayed after times in the agenda. See docstring for
details.
+*** ~tags-todo~ custom searches now include DONE keywords
+
+Use "/!" markup when filtering TODO keywords to get only not-done TODO
+keywords.
+
** New features
*** ~org-attach~ can move directory contents
When setting a new directory for an entry, org-attach offers to move
diff --git a/lisp/org.el b/lisp/org.el
index a3cc257..d96da86 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14100,8 +14100,8 @@ for inclusion. See `org-make-tags-matcher' for more information.
As a special case, it can also be set to t (respectively nil) in
order to match all (respectively none) headline.
-When TODO-ONLY is non-nil, only lines with a not-done TODO
-keyword are included in the output.
+When TODO-ONLY is non-nil, only lines with a TODO keyword are
+included in the output.
START-LEVEL can be a string with asterisks, reducing the scope to
headlines matching this string."
@@ -14186,7 +14186,7 @@ headlines matching this string."
(when (and
;; eval matcher only when the todo condition is OK
- (and (or (not todo-only) (member todo org-not-done-keywords))
+ (and (or (not todo-only) (member todo org-todo-keywords-1))
(if (functionp matcher)
(let ((case-fold-search t) (org-trust-scanner-tags t))
(funcall matcher todo tags-list level))
@@ -14200,7 +14200,7 @@ headlines matching this string."
;; Check if timestamps are deselecting this entry
(or (not todo-only)
- (and (member todo org-not-done-keywords)
+ (and (member todo org-todo-keywords-1)
(or (not org-agenda-tags-todo-honor-ignore-options)
(not (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item))))))