Hi list,
Some of my agenda files use custom TODO keywords (set through a
#+SETUPFILE), and some use the standard TODO | DONE keywords. I recently discovered that TODO blocking is broken in the files which use custom keywords.
It turns out the org-not-done-heading-regexps variable was global instead of buffer-local like the other *-regexp variables; this appears to be due to a typo in org.el.
I think the blocker hook (org-block-todo-from-children-or-siblings-or-parent) was picking up the global value (set by one of the "factory-default" buffers, which got opened last) and applying it to buffers with my custom TODO keywords, so it was not correctly identifying some headlines as TODO headlines.