From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Add NO-STATS switch to org-get-heading Date: Fri, 13 Mar 2020 18:22:26 +0100 Message-ID: <87sgic890t.fsf@nicolasgoaziou.fr> References: <20200313151145.29469-1-brice@waegenei.re> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:53337) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCo16-0001eS-Bg for emacs-orgmode@gnu.org; Fri, 13 Mar 2020 13:22:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCo14-0003BT-S3 for emacs-orgmode@gnu.org; Fri, 13 Mar 2020 13:22:35 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:22095) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCo14-00032J-LY for emacs-orgmode@gnu.org; Fri, 13 Mar 2020 13:22:34 -0400 In-Reply-To: <20200313151145.29469-1-brice@waegenei.re> (Brice Waegeneire's message of "Fri, 13 Mar 2020 16:11:45 +0100") 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, Brice Waegeneire writes: > * 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. Regards, -- Nicolas Goaziou