From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [bug] TODO [/] cookie not updating if list has inline task Date: Sun, 17 May 2015 20:51:24 +0200 Message-ID: <877fs782c3.fsf@nicolasgoaziou.fr> References: <877fs75tzk.fsf@ucl.ac.uk> <87r3qfgvm4.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58916) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yu3dS-0008Vh-20 for emacs-orgmode@gnu.org; Sun, 17 May 2015 14:50:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yu3dR-0001ek-6K for emacs-orgmode@gnu.org; Sun, 17 May 2015 14:50:02 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:53000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yu3dQ-0001ee-W9 for emacs-orgmode@gnu.org; Sun, 17 May 2015 14:50:01 -0400 In-Reply-To: <87r3qfgvm4.fsf@gmx.us> (rasmus@gmx.us's message of "Sun, 17 May 2015 15:51:47 +0200") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rasmus Cc: emacs-orgmode@gnu.org Hello, Rasmus writes: > Can you try the attached patch? It seems to work on my system, but > probably more cleanup should be made wrt the "old" outline-functions. > + (org-with-wide-buffer > + (org-next-visible-heading 1) > + (point))))) You shouldn't use `org-next-visible-heading' as statistics cookie updates shouldn't depend on current visibility. Also, the problem is more subtle: you have to check if you're within an inlinetask, in which case you don't want to use `org-with-limited-levels' or not. Anyway, we could fix it in another way. Eric's example, - [ ] the first task *************** This is something to note *************** END - [ ] another list of tasks is misleading because it's really the same list, i.e., inlinetasks are allowed in items, so "This is something to note" belongs to "the first task". So, our option is to simply dis-allow inlinetasks in plain lists. That would also solve the issue. WDYT? Regards, -- Nicolas Goaziou