Aria Groult via "General discussions about Org-mode." <emacs-orgmode@gnu.org> writes:
> "Florian Lindner" <mailingli...@xgm.de> writes: > >> I want to use consult-org-agenda which uses an MATCH argument like >> org-map-entries. >> >> For that, how can I match any todo keyword, i.e., any state that is not >> done? Without naming them explicitly. > > I'm not sure this is possible. From the documentation the MATCH should > be one specific keyword. There may be a more elegant solution, but this should work: TODO={.+}-TODO="DONE" The first part uses a regular expression to check for any TODO keyword at all, the second excludes those with DONE. Note that if we have multiple 'done' states, e.g. "CANCELED" here, #+TODO: TODO STARTED | DONE CANCELED this solution will also include CANCELED unless you specifically list it, e.g. with TODO={.+}-TODO={DONE\|CANCELED} To generally distinguish between done and not-done states, Org internally sets buffer-local variables org-done-keywords and org-not-done-keywords, but I'm not aware of a way to leverage them through the match syntax. Does anyone? Otherwise, it might be nice to introduce corresponding generic keywords in the match syntax (similar to how we can match timestamps against <now>). Yours, Christian