Max Nikulin writes: > On 07/10/2022 12:14, Ihor Radchenko wrote: >> >> The following commit adds `string-trim', which is not yet available in >> Emacs 26. > > 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 And of course please feel free to beat me to it and fix it however you see fit. Thanks.