From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: Feature request: more automatic updating of cookies [8.3.6 (8.3.6-4-g4835be-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20160926/)] Date: Sun, 02 Oct 2016 11:20:19 +0200 Message-ID: <87twcvumy4.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqcwX-0007Av-2U for emacs-orgmode@gnu.org; Sun, 02 Oct 2016 05:20:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqcwV-0003aT-Rn for emacs-orgmode@gnu.org; Sun, 02 Oct 2016 05:20:20 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:58126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqcwV-0003aG-LJ for emacs-orgmode@gnu.org; Sun, 02 Oct 2016 05:20:19 -0400 In-Reply-To: (Jorge's message of "Tue, 27 Sep 2016 09:34:31 -0300") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Jorge Cc: org mode Hello, Jorge writes: > Paste the following in an Org buffer: > > * Cookie_a [0/0] * TODO Dummy_a * Cookie_b [0/1] ** TODO Dummy_b > > Within that buffer: > 1. Move point to the line of Dummy_a. > 2. > I wished the cookie to be updated to [0/1] but it is not. > > Then: > 1. Move point to the line of Dummy_b. > 2. C-c C-x C-w > 3. Move point to the line of Dummy_a at column 0. > 4. C-c C-x C-y > I wished both cookies to be updated. They are not. > > The manual [[info:org#Checkboxes][says]]: > Checkbox statistic cookies are updated automatically if you toggle > checkboxes with `C-c C-c' and make new ones with `M-S-'. TODO > statistics cookies update when changing TODO states. If you delete > boxes/entries or add/change them by hand, use this command to get things > back into sync. > > I request the feature of Org automatically updating cookies when using > structure editing commands such as C-c C-x C-w, C-c C-x C-y, , > and friends. This could be governed by a user option. I don't think we should do that. This would slow down many commands. Also we cannot cover all uses cases (e.g., selecting a tree, C-w, C-y elsewhere) so we cannot guarantee that cookies are always up-to-date, so you ultimately need to intervene manually. Org provides automatic updating for obvious actions, as explained in the manual. Doing more would be much work for little benefit. > The point is that C-u C-c # (to update cookies in the entire buffer) takes > long enough that I only call it a few times per week. This means that cookies > can get out of sync. Then I try to remember manually invoking C-c # on the > relevant line every time it goes out of sync, but I sometimes omit it. We could try to improve speed when updating cookies in a whole buffer. A detailed profiler report in your situation could help. Also, we could add more hooks, if needed, so as to call `org-update-statistics-cookies' more often. Regards, -- Nicolas Goaziou