Something like this:

* TODO Go for a walk [0/2]
** TODO Walk for 30 minutes
** TODO Walk for 30 minutes

Would become something like this:

* TODO Walk for 1 hour {0/2}

And then, the state cycle would be:

-> TODO {0/2} -> TODO {0/1} -> ... -> DONE {2/2} -> TODO {0/2} -> ...
  • 2
    [I was not the person who down-voted without leaving constructive criticism in the form of a comment.] There is no built-in support (that I am aware of) to perform calculations and text modifications incorporating said calculations when using the org-cycle functions.
    – lawlist
    Jul 31 '17 at 18:01

So long as all the tasks in one file have the same number of sub-tasks, then you can customize the TODO keywords, like this:

#+SEQ_TODO: TODO:{0/2} TODO:{1/2} | DONE:{2/2}

* TODO:{0/2} Go for a walk

That should produce the state cycle you want.

After editing the SEQ_TODO keywords, you need to type C-c C-c on that line so that org will recognize the change. Note that you can't use a normal space in a TODO keyword if you set it this way, although you could if you set it programmatically, or you could use a unicode non-breaking space (e.g., type C-x 8 <return> non br sp).

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.