emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "J. G." <jerzor@pacbell.net>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] org-list.el: Reduce scope to subtree
Date: Tue, 26 Sep 2023 14:44:22 +0000 (UTC)	[thread overview]
Message-ID: <1700336757.1605468.1695739462846@mail.yahoo.com> (raw)
In-Reply-To: <87edil9t1a.fsf@localhost>


[-- Attachment #1.1: Type: text/plain, Size: 1857 bytes --]

 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 <yantar92@posteo.net> wrote:  
 
 "J. G." <jerzor@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>
  

[-- Attachment #1.2: Type: text/html, Size: 4114 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: example.org --]
[-- Type: text/org, Size: 1736 bytes --]

* 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	other threads:[~2023-09-26 14:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <861235485.1488189.1695598530412.ref@mail.yahoo.com>
2023-09-24 23:35 ` [PATCH] org-list.el: Reduce scope to subtree J. G.
2023-09-26  9:34   ` Ihor Radchenko
2023-09-26 14:44     ` J. G. [this message]
2023-10-05  9:40       ` Ihor Radchenko
2023-10-05 13:04         ` Jeremias Gonzalez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1700336757.1605468.1695739462846@mail.yahoo.com \
    --to=jerzor@pacbell.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).