Org-Mode proposes to use the following org-summary-todo function in the org-after-todo-statistics-hook:

(defun org-summary-todo (n-done n-not-done)
  "Switch entry to DONE when all subentries are done, to TODO otherwise."
  (let (org-log-done org-log-states)   ; turn off logging
    (org-todo (if (= n-not-done 0) "DONE" "TODO"))))

Now I have added a WAIT state to the TODO states:


But org-summary-todo will mark headlines as TODO although all sub tasks are in WAIT state, which is obviously wrong, because there is nothing to do.

* TODO Tasks [0/2]
** WAIT Bob
** WAIT Alice

How to extend the org-summary-todo function in that way, that headlines are marked with WAIT instead of TODO, when all sub tasks are marked with WAIT?

Is it also possible to extend the brackets tag in that way that it distinguishes between all TODO states and not only done and not done?

If there are mixed states I would prefer the following summary:

* WAIT All others [0/2/2]
** WAIT Bob
** WAIT Alice
* TODO Mixed [1/1/2]
** TODO My job
** WAIT Others job
  • 1
    To be fair, by looking at the code, I don't think priority cookies were designed to have more than two numbers in them, so if you really want that, it seems like a bit of programming to do. – wvxvw Dec 4 '14 at 22:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.