I would like to set/unset a property when entering a certain TODO
state.
Example: Set the property :COOKIE_DATA: todo recursive
automatically when the state is set to PROJ
. So all the TODO
s in project headings would be counted recursively, and not only TODO
s which are direct children of the current tree (default).
How could this be done?
I do not want to set org-hierarchical-todo-statistics
to activate recursive counting for every TODO
globally.
org-after-todo-state-change-hook
. The function should check the currentTODO
state: if it isPROJ
add the property, otherwise delete it. See theProperty API
section of the manual withC-h i g(org)Using the Property API
for relevant functions.