From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brice Waegeneire Subject: Re: [PATCH] Add NO-STATS switch to org-get-heading Date: Fri, 13 Mar 2020 17:41:44 +0000 Message-ID: References: <20200313151145.29469-1-brice@waegenei.re> <87sgic890t.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49376) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCoJh-0003vx-Ca for emacs-orgmode@gnu.org; Fri, 13 Mar 2020 13:41:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCoJg-00078V-6a for emacs-orgmode@gnu.org; Fri, 13 Mar 2020 13:41:49 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:62905) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCoJg-0006zN-0g for emacs-orgmode@gnu.org; Fri, 13 Mar 2020 13:41:48 -0400 In-Reply-To: <87sgic890t.fsf@nicolasgoaziou.fr> 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: Brice Waegeneire Cc: emacs-orgmode@gnu.org Hello Nicolas, On 2020-03-13 17:22, Nicolas Goaziou wrote: >> * lisp/org-element.el (org-element-context): Handle headlines only >> containing a statistics cookie. >> * lisp/org.el (test-org/get-heading): Add regex capture group 6 for >> statistics cookie. >> (org-get-heading): Add NO-STATS argument, if >> non-nil, will not return the statistics cookie. >> * testing/lisp/test-org.el (test-org/get-heading): Add 3 tests using >> the >> NO-STATS argument. > > This assumes statistics cookie is always located at the end of the > title, before the tags. This is not required by the syntax. > > Syntax can evolve, but it could introduce many backward > incompatibilities, so it must be discussed first. I wasn't sure about this. I don't remember ever seeing somebody putting the statistics cookie before the title but org-complex-heading-regexp-format does support two position for the statistics cookie. Would adding support for the two locations to this patch make the review process faster? I was just looking for a way to get a heading title without any metadata. Cheers.