Fix explanation, if state change is blocked by contained checkboxes
commit165f7c395073b649d7da9a12c52a34b724ed4cf0
authorMarc Ihm <marc@ihm.name>
Fri, 14 Apr 2017 15:49:50 +0000 (14 17:49 +0200)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Mon, 17 Apr 2017 08:33:51 +0000 (17 10:33 +0200)
treec506e2a1312277e62ddf130769ceea64fe177a03
parent6bd52105358ee95548d065b4ec890f451779cc90
Fix explanation, if state change is blocked by contained checkboxes

* lisp/org.el (org-todo): Fix explanation, if state change is blocked
  by contained checkboxes.

Consider a node, which contains unchecked checkboxes; if you have set
org-enforce-todo-checkbox-dependencies and try to change the node to
DONE, you will be denied with a message explaining why. However in this
special case the explanation would be wrong in talking of an unrelated
node instead of the checkboxes.

The fix uses the already existing variable org-blocked-by-checkboxes
(which is handled in org-block-todo-from-checkboxes).  Similar code is
already present in org-agenda-dim-blocked-tasks within org-agenda.el.
lisp/org.el