Clarify that TODO matches only match not-DONE states by default
commit2e73ce217779330d446a908627ec19875dc3fd05
authorCarsten Dominik <carsten.dominik@gmail.com>
Tue, 22 Jun 2010 06:26:24 +0000 (22 08:26 +0200)
committerCarsten Dominik <carsten.dominik@gmail.com>
Tue, 22 Jun 2010 12:47:37 +0000 (22 14:47 +0200)
tree79d3ff1b6cf5fb1e580c7e45a9c22440fb2d0d76
parenteade8e6fa3450e2eddcd8b4491f1f40fd3ba1ac9
Clarify that TODO matches only match not-DONE states by default

Bernt Hansen writes:

> I was talking to Jeff Stern about tags todo matching offlist and we
> think the documentation for tags-todo matching can probably be improved.
>
> The description of C-c a M at
> http://orgmode.org/manual/Matching-tags-and-properties.html
> states
>
> C-c a M
>
>    Like C-c a m, but only select headlines that are also TODO items and
>    force checking subitems (see variable
>    org-tags-match-list-sublevels). To exclude scheduled/deadline items,
>    see the variable org-agenda-tags-todo-honor-ignore-options. Matching
>    specific TODO keywords together with a tags match is also possible,
>    see Tag searches.
>
> When I read this I think TODO items is any todo keyword but this isn't
> the case.  It is only non-done TODO state keywords.  This makes
> tags-todo matching not work for finding tasks to archive (normally
> DONE | CANCELLED keywords in my setup)
>
> Should we explicitly state that 'headlines that are also TODO items'
> does not match DONE state keywords?  Or alternatively should TODO items
> and DONE items be separate (and explicitly defined) in the documentation
> -- like org-todo-keywords and org-done-keywords?
>
> I still think 'TODO keyword' matches any todo keyword defined in
> org-todo-keywords and maybe I need to be re-educated :)

Bernt is right, and this patch tries to clarify the issue.
doc/org.texi
lisp/org-agenda.el