Good catch, thanks for the feedback.
The original problem I was attempting to correct was when making use of 
org-contrib's org-checklist.el feature to reset checkboxes with the 
RESET_CHECK_BOXES property. The earliest report of this bug I'm aware of is 
here: https://github.com/doomemacs/doomemacs/issues/1503
When the relevant headline has that property set, is recurring, and is marked 
as done, the headline and its subtrees (without my patch as I've now learned) 
have their checkboxes and counter cookies correctly reset. However, top level 
headlines elsewhere have their counter cookies incorrectly reset to [0/0].
I have attached an example org file which contains a subheading "The heading to 
mark done to reproduce the problem" that when set to done will demonstrate this 
problem. I see the top level headings "Test heading 2" and "Test heading 3" 
have their counter cookies set to [0/0] which is not the desired behavior.    
On Tuesday, September 26, 2023 at 02:33:52 AM PDT, Ihor Radchenko 
<yanta...@posteo.net> wrote:  
 
 "J. G." <jer...@pacbell.net> writes:

> Hi, this patch reduces the scope of the function 
> org-reset-checkbox-state-subtree to just the subtree per its name and 
> documentation.
> ...
> -    (org-update-checkbox-count-maybe 'all)))))
> +    (org-update-checkbox-count-maybe)))))

Thanks for the patch, but without 'all argument,
`org-update-checkbox-count-may' will limit the scope to current
_heading_, not subtree.

May you please describe in more details the problem you experience?
Ideally with a reproducer. See https://orgmode.org/manual/Feedback.html#Feedback

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
  
* My top level heading to hold [1/3]
** TODO Another test heading
** DONE Yet another test heading
CLOSED: [2023-09-26 Tue 07:30]
** TODO The heading to mark done to reproduce the problem [3/3]
SCHEDULED: <2023-09-24 Sun ++1w>
:PROPERTIES:
:RESET_CHECK_BOXES: t
:END:
- [X] An extra box
- [X] Another extra box
- [X] Final extra box
*** DONE My first set [5/5]
CLOSED: [2023-09-26 Tue 07:06]
- [X] My stuff
- [X] More stuff
- [X] Even more stuff
- [X] Lots of stuff
- [X] Final stuff
*** DONE My second set [5/5]
CLOSED: [2023-09-26 Tue 07:06]
- [X] My stuff
- [X] More stuff
- [X] Even more stuff
- [X] Lots of stuff
- [X] Final stuff
*** DONE My third set [5/5]
CLOSED: [2023-09-26 Tue 06:49]
- [X] My stuff
- [X] More stuff
- [X] Even more stuff
- [X] Lots of stuff
- [X] Final stuff
* Test heading 2 [1/3]
:PROPERTIES:
:RESET_CHECK_BOXES: t
:END:
** TODO My first set 2 [3/5]
- [ ] My stuff
- [X] More stuff
- [ ] Even more stuff
- [X] Lots of stuff
- [X] Final stuff
** TODO My second set 2 [3/5]
- [X] My stuff
- [X] More stuff
- [ ] Even more stuff
- [X] Lots of stuff
- [ ] Final stuff
** DONE My third set 2 [5/5]
CLOSED: [2023-09-26 Tue 06:49]
- [X] My stuff
- [X] More stuff
- [X] Even more stuff
- [X] Lots of stuff
- [X] Final stuff
* Test heading 3 [2/3]
:PROPERTIES:
:RESET_CHECK_BOXES: t
:END:
** TODO My first set 2 [4/5]
- [X] My stuff
- [X] More stuff
- [ ] Even more stuff
- [X] Lots of stuff
- [X] Final stuff
** DONE My second set 2 [5/5]
CLOSED: [2023-09-26 Tue 07:10]
- [X] My stuff
- [X] More stuff
- [X] Even more stuff
- [X] Lots of stuff
- [X] Final stuff
** DONE My third set 2 [5/5]
CLOSED: [2023-09-26 Tue 06:49]
- [X] My stuff
- [X] More stuff
- [X] Even more stuff
- [X] Lots of stuff
- [X] Final stuff

Reply via email to