1

Say I have the following org file:

* do all my chores [0%]
1. [-] vacuuming [50%]
   1. [X] vacuum kitchen
   2. [ ] vacuum pool
** TODO shopping [33%]
*** DONE buy hot sauce
CLOSED: [2019-01-18 Fri 17:57]
*** TODO buy hot peppers
*** TODO buy hot dogs

The top-level headline ("do all my chores") has two children; neither is done. One is a plain list ("vacuuming") with a statistics cookie at 50%. The second is a headline ("shopping") at 33%.

I would expect the top-level statistics cookie to be at 42% (an average of 50 and 33). However, it's actually at 0% -- I assume because none of its direct subtasks has been completed. Can I make it be at 42%?

1 Answer 1

2

It isn't exactly what you want, but setting the COOKIE_DATA property to recursive will count subtasks instead of just the immediate children.

* do all my chores [25%] [1/4]
  :PROPERTIES:
  :COOKIE_DATA: recursive
  :END:
1. [-] vacuuming [50%]
   1. [X] vacuum kitchen
   2. [ ] vacuum pool
** TODO shopping [33%]
*** DONE buy hot sauce
CLOSED: [2019-01-18 Fri 17:57]
*** TODO buy hot peppers
*** TODO buy hot dogs

I find it to behave a little strangely when there is a mix of checkboxes and headlines. If you convert everything to a headline you get something more understandable:

* do all my chores [28%] [2/7]
  :PROPERTIES:
  :COOKIE_DATA: recursive
  :END:
** TODO vacuuming [50%]
*** DONE vacuum kitchen
*** TODO vacuum pool
** TODO shopping [33%]
*** DONE buy hot sauce
CLOSED: [2019-01-18 Fri 17:57]
*** TODO buy hot peppers
*** TODO buy hot dogs

This include the "vacuuming" and "shopping" tasks as undone, which is why you only get 28% complete. Finally, if you remove the TODO keyword from the grouped headlines you get what you want:

* do all my chores [40%] [2/5]
  :PROPERTIES:
  :COOKIE_DATA: recursive
  :END:
** vacuuming [50%]
*** DONE vacuum kitchen
*** TODO vacuum pool
** shopping [33%]
*** DONE buy hot sauce
CLOSED: [2019-01-18 Fri 17:57]
*** TODO buy hot peppers
*** TODO buy hot dogs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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