From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qGsJGqPHrV/tagAA0tVLHw (envelope-from ) for ; Thu, 12 Nov 2020 23:39:15 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id duW+FaPHrV/FUgAAbx9fmQ (envelope-from ) for ; Thu, 12 Nov 2020 23:39:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A03FE9402DD for ; Thu, 12 Nov 2020 23:39:14 +0000 (UTC) Received: from localhost ([::1]:48140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdMBM-00073n-RC for larch@yhetil.org; Thu, 12 Nov 2020 18:39:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdMAi-00073U-MX for emacs-orgmode@gnu.org; Thu, 12 Nov 2020 18:38:32 -0500 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:38317) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdMAg-0000uI-Sw for emacs-orgmode@gnu.org; Thu, 12 Nov 2020 18:38:32 -0500 Received: by mail-pf1-x431.google.com with SMTP id 10so6014676pfp.5 for ; Thu, 12 Nov 2020 15:38:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=uzUHNde/63rGpHh259ntxPk3UpiChJ+qVbPG5+H7Oas=; b=Meccvs94m0kRgKLe2ow2wPurUkdphnZYpuZgF/3HYH2n2bMDQ3UeXycjbbQzjGIE0n Va9zWKrbpv+rkoIb0r7QtEric4wfdkLJ3mxwZa5WSkEbmZnq5kD0AgrqVCl5vwrsQX6s 4hal5NQlmwGREO0ZeB3ME47RRf/c4UeiuIr/KXfDThTWBnSlOBALcFl3YWhj15q6b2b+ vfTDGKJl/r5Lnxr3A0akCq2KDrzK1+yVaL1oefSYFoJQWzdCVM8Xpw20ELHZyuQWmVZK mNM9kIPKgvrKdITY+mHco+yATvd1+ss8v2E5KL09ClbcK4faL/eN2ZJIDhgraav8AOv8 4Gfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=uzUHNde/63rGpHh259ntxPk3UpiChJ+qVbPG5+H7Oas=; b=J6DK1JtEsG7FHV6lsyu/s9mDTfzpFUcosuYxJ8W63F1WMt6FNX06Vc9S424fXMrgjU iVff9RoWEX3ciIc4zbjVEafeekJwGIxO8fHtmSsiqgJuGnB+sfhc5nCgTgANK1C72jT4 FPIuHBCSlGvu9ZyXCI2ZYF6w6QgigpgLOfSiGjWqvRY2xh8ehBwyVbNXn1mFvYAsX1Nn yUiP9dArB97KCsXorKEIuH8VfATJQbzOrH42e84AJcstJNy4FALHa4jHa9JMKalC6M8/ 417EzgUlk9C6JPZzygUJ82/E0KcQmUFY1+/OHhxuxbWeEJiuopMm/tX1XUXjzO/WPlMn BPAA== X-Gm-Message-State: AOAM532neY31Gf7Rwml19R5jCJcD/PzTupa/22TqHL7wBHhfIRhAc3uC U3Frg23/fiE+gLnZ6s7D78VQVFOvPPUl X-Google-Smtp-Source: ABdhPJyJ51SLmxBOh6QjJZNWC4r/OFB6PlfCVgxGGZl4p6UX8VisO1OMUc3NAsAZ1FG79llJX4xtrw== X-Received: by 2002:a62:be11:0:b029:15f:ea29:9228 with SMTP id l17-20020a62be110000b029015fea299228mr1630862pff.8.1605224308994; Thu, 12 Nov 2020 15:38:28 -0800 (PST) Received: from ?IPv6:2605:e000:151e:8496:d42c:1770:10f6:1366? ([2605:e000:151e:8496:d42c:1770:10f6:1366]) by smtp.gmail.com with ESMTPSA id d18sm7547367pfo.133.2020.11.12.15.38.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Nov 2020 15:38:26 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: Missing argument in org-reset-checkbox-state-subtree? From: Bob Wilson In-Reply-To: <87lff76yz5.fsf@kyleam.com> Date: Thu, 12 Nov 2020 15:38:25 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <63F5E930-CA35-4697-BAC6-DF4B2373ACBC@gmail.com> References: <56D08D2C-83C1-42C3-A7AF-BCDA797DA277@gmail.com> <87lff76yz5.fsf@kyleam.com> To: Kyle Meyer X-Mailer: Apple Mail (2.3608.120.23.2.4) Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=millstadtf@gmail.com; helo=mail-pf1-x431.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Meccvs94; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.21 X-TUID: HToJbpKHa+BD Thanks again Kyle, Per your suggestion I have reverted my change to = org-reset-checkbox-state-subtree, and instead updated = org-reset-checkbox-state-maybe in org-checklist.el (I=E2=80=99m much = happier editing org add-ons than editing org!). Specifically, I follow up org-reset-checkbox-state-subtree with a call = to: (org-map-entries =E2=80=98org-update-parent-todo-statistics) and this seems to address my problem as well, but definitely more = elegantly! Kind regards, Bob > On Nov 11, 2020, at 7:22 PM, Kyle Meyer wrote: >=20 > Bob Wilson writes: >=20 >> I=E2=80=99m writing about a possible bug in >> org-reset-checkbox-state-subtree. This function calls >> org-update-checkbox-count-maybe with argument 'all, but this value is >> not defined in the function (or anywhere else that I can see). >=20 > [ I'm looking at the copy on master (e9c3993ee), though org-list.el > hasn't changed since that last release. ] >=20 > org-reset-checkbox-state-subtree calls >=20 > (org-update-checkbox-count-maybe 'all) >=20 > and org-update-checkbox-count-maybe calls >=20 > (org-update-checkbox-count all) >=20 > And org-update-checkbox-count considers ALL, so I'm not spotting > anything that's undefined. >=20 >> I=E2=80=99d like this value to be nil because I don=E2=80=99t want to = update the >> statistics cookies in the entire buffer, but I don=E2=80=99t see a = way to do >> this (pardon my limited elisp). My workaround is to add an optional >> all argument to org-reset-checkbox-state-subtree and pass it to >> org-update-checkbox-count-maybe. >=20 > Why does refreshing the stats for the entire buffer cause a problem = for > you? >=20 >> This seems like the desired functionality unless I=E2=80=99m missing >> something. Is the current implementation intentional? >=20 > Yes, the change was made with a0bc3bdeb (org-list: fix update of > check-boxes cookies in whole trees, 2011-06-20). The example that > prompted that change was reported at > . >=20 > Here's a reduced example: >=20 > * a > ** aa [1/1] > - [X] l > ** ab [1/1] > - [X] m >=20 > Calling org-reset-checkbox-state-subtree with point at the top-level = "a" > should uncheck l and m and the stats of both subheadings should go to > [0/1]: >=20 > * a > ** aa [0/1] > - [ ] l > ** ab [0/1] > - [ ] m >=20 > If you were to drop `all' from -reset-checkbox-state-subtree's the = call > to -update-checkbox-count-maybe, the result would instead be >=20 > * a > ** aa [1/1] > - [ ] l > ** ab [0/1] > - [ ] m