emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] Re: 98e168b48 Add compatibility wrapper for string-clean-white


From: Ihor Radchenko
Subject: Re: [BUG] Re: 98e168b48 Add compatibility wrapper for string-clean-whitespace (Emacs 26 compatibility) [9.6-pre (release_9.5.5-920-g057193 @ /home/yantar92/.emacs.d/straight/build/org/)]
Date: Sat, 08 Oct 2022 13:04:22 +0800

Kyle Meyer <kyle@kyleam.com> writes:

>> It is available in Emacs-26, however (require 'subr-x) should be added.
>>
>> There is `org-trim' and despite it is less generic, likely it can be
>> used if subr-x is avoided for some reason.
>
> Ihor, sorry for overlooking that.  As Max mentions, indeed string-trim
> used to be in subr-x.  It's been available since Emacs 24 and was
> relocated with Emacs 28's a4ececf004e (Move string-trim functions to
> subr.el, 2021-03-24).
>
> I won't be at my computer much today or tomorrow, but, when I get a
> chance, I'll plan to add something like
>
>   (eval-when-compile (require 'subr-x))  ; Emacs < 28

I am a bit confused about usage of subr-x in Org.

I do recall Nicolas repeatedly voicing against usage of subr-x staff:

https://orgmode.org/list/87wo4en8qk.fsf@nicolasgoaziou.fr
>>>       2. we don't use "subr-x.el" in the code base. In particular, it would 
>>> be
>>>       nice to replace `when-let' with `when' + `let'. This change costs
>>>       only one loc.

However, he did not mention the reasoning behind this, except a single
massage I was able to find:

https://orgmode.org/list/8737t0b2c9.fsf@nicolasgoaziou.fr
>>>  ... you are not using `if-let' anywhere if this patch. Besides, we still
>>>  cannot use subr-x, since it is a 24.4 library, and, AFAIR, we didn't
>>>  drop support for 24.3 yet.

If supporting Emacs 24 is the only blocker for subr-x, it should be safe
to use it.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]