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 cHa3DK+qrF/4UwAA0tVLHw (envelope-from ) for ; Thu, 12 Nov 2020 03:23:27 +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 0GR8CK+qrF+rZgAAbx9fmQ (envelope-from ) for ; Thu, 12 Nov 2020 03:23:27 +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 39A7A940355 for ; Thu, 12 Nov 2020 03:23:26 +0000 (UTC) Received: from localhost ([::1]:33608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kd3Cl-0001nU-O1 for larch@yhetil.org; Wed, 11 Nov 2020 22:23:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kd3CE-0001nC-Bm for emacs-orgmode@gnu.org; Wed, 11 Nov 2020 22:22:50 -0500 Received: from pb-smtp21.pobox.com ([173.228.157.53]:54205) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kd3Bw-0003tv-JJ for emacs-orgmode@gnu.org; Wed, 11 Nov 2020 22:22:49 -0500 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 3EE0CF3B66; Wed, 11 Nov 2020 22:22:27 -0500 (EST) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=OtnW354r9Lfo 11fV0fJEogSP7jc=; b=LlKvWh/aJOz3zrlbLKHj/M5dIYdu/ZjZJXL/9cY8UhRd d9dK1nAgF7e18DOCVSRpuHpeZp1GsT4f44FoQgPSHWvPiwCPNBizlAgB867ft6mG AuohZ2ww9xer2mHUjPGFzk1BqLsDnWQZTK3oBJZNwXqo1I2RPa9XspbN//1QfgQ= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 37F3FF3B65; Wed, 11 Nov 2020 22:22:27 -0500 (EST) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=OaKAzJ6KDAvFLyBtHW2wK4BzlCZ4x6n4wDnoUTxI364=; b=LRHxJ22QhJeMgsK0tDdIYevRUPuKKR755P+zTomDychc+nyPy70QW2p8Uqc6g2Dc49AYAH9eGknOOc+EMvI7G7dOSmgjCW3p9HIg9jpzNWb7duJ9PrMCaF8X5qGsX0tmOjuBctnT7Ia2aLhQIhJMl1gfIxlhHRAU0UqfBUVZPqU= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id A2F5BF3B64; Wed, 11 Nov 2020 22:22:24 -0500 (EST) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: Bob Wilson Subject: Re: Missing argument in org-reset-checkbox-state-subtree? In-Reply-To: <56D08D2C-83C1-42C3-A7AF-BCDA797DA277@gmail.com> References: <56D08D2C-83C1-42C3-A7AF-BCDA797DA277@gmail.com> Date: Wed, 11 Nov 2020 22:22:22 -0500 Message-ID: <87lff76yz5.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Pobox-Relay-ID: 489C6D42-2496-11EB-BA54-D609E328BF65-24757444!pb-smtp21.pobox.com Received-SPF: pass client-ip=173.228.157.53; envelope-from=kyle@kyleam.com; helo=pb-smtp21.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/11 22:22:27 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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=pobox.com header.s=sasl header.b=LlKvWh/a; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=LRHxJ22Q; dmarc=none; 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: 1IltXsaNTtp6 Bob Wilson writes: > 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). [ I'm looking at the copy on master (e9c3993ee), though org-list.el hasn't changed since that last release. ] org-reset-checkbox-state-subtree calls (org-update-checkbox-count-maybe 'all) and org-update-checkbox-count-maybe calls (org-update-checkbox-count all) And org-update-checkbox-count considers ALL, so I'm not spotting anything that's undefined. > I=E2=80=99d like this value to be nil because I don=E2=80=99t want to upd= ate 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. Why does refreshing the stats for the entire buffer cause a problem for you? > This seems like the desired functionality unless I=E2=80=99m missing > something. Is the current implementation intentional? 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 . Here's a reduced example: * a ** aa [1/1] - [X] l ** ab [1/1] - [X] m 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]: * a ** aa [0/1] - [ ] l ** ab [0/1] - [ ] m If you were to drop `all' from -reset-checkbox-state-subtree's the call to -update-checkbox-count-maybe, the result would instead be * a ** aa [1/1] - [ ] l ** ab [0/1] - [ ] m