`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>
This commit is contained in:
Nicolas Goaziou 2017-08-17 15:16:07 +02:00
parent db0ef4d06e
commit 2fb129b5c7
2 changed files with 9 additions and 4 deletions

View File

@ -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

View File

@ -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))))))