orgmode
                                
                                 orgmode copied to clipboard
                                
                                    orgmode copied to clipboard
                            
                            
                            
                        Auto-updating checkbox cookies
Does this feature exist in Emacs orgmode core?
Yes
Orgmode link
https://orgmode.org/manual/Checkboxes.html
Feature value
No response
Additional context
Would it be possible to have auto-updating checkbox cookies such that checking off an item in a list updates the progress? More specifically, say I have this task tree:
* My project [/]
- [ ] Task 1
- [ ] Task 2
- [ ] Task 3
Checking off Task 1 by keybind will update the cookie
* My project [1/3]   <- cookie updated to number of items in tree
- [x] Task 1
- [ ] Task 2
- [ ] Task 3
And checking off Task 2 will automatically increment the cookie
* My project [2/3]   <- number of item completed updated
- [x] Task 1
- [x] Task 2
- [ ] Task 3
It would be nice to have this for percent's too!
In emasc, checking off 1/3 is [33%], 2/3 is [66%] etc.
I built a working POC for this. I can make a proper PR, but I am not sure where in the code it would make sense to add :thinking:
I use treesitter to get all cookies, then calculate the progress and display it with virtual text

@lukas-reineke you can either put it in the lua/orgmode/org/syntax.lua and call it the same way other things are called from that file, or you can even create a new file in that folder if there's a lot of code. Feel free to open up a PR and we can discuss it.
This should work also for subtree. E.g., this should work:
** TODO my task [/]
*** TODO which has a subtask
@mcepl see #305
This issue can be closed @kristijanhusak