|
From: | Brice Waegeneire |
Subject: | Re: [PATCH] Add NO-STATS switch to org-get-heading |
Date: | Fri, 13 Mar 2020 17:41:44 +0000 |
User-agent: | Roundcube Webmail/1.3.8 |
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 theNO-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-formatdoes 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.
[Prev in Thread] | Current Thread | [Next in Thread] |