Re: [PATCH] Add NO-STATS switch to org-get-heading

2020-03-14 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Adam Porter writes: > Please don't add more arguments to org-get-heading. It used to have 2, > then it had 4, and now you want to add a 5th. Every time the function's > signature changes, it breaks code in third-party packages and user code > in

Re: [PATCH] Add NO-STATS switch to org-get-heading

2020-03-13 Thread Adam Porter
Please don't add more arguments to org-get-heading. It used to have 2, then it had 4, and now you want to add a 5th. Every time the function's signature changes, it breaks code in third-party packages and user code in random places, which requires the addition of messy compatibility code and inte

Re: [PATCH] Add NO-STATS switch to org-get-heading

2020-03-13 Thread Brice Waegeneire
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-ni

Re: [PATCH] Add NO-STATS switch to org-get-heading

2020-03-13 Thread Nicolas Goaziou
Nicolas Goaziou writes: > 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. Also, note that statistics co

Re: [PATCH] Add NO-STATS switch to org-get-heading

2020-03-13 Thread Nicolas Goaziou
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 ret

[PATCH] Add NO-STATS switch to org-get-heading

2020-03-13 Thread Brice Waegeneire
* 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-