[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: org-macs ignoring stock functionality
From: |
Nicolas Goaziou |
Subject: |
Re: org-macs ignoring stock functionality |
Date: |
Mon, 19 Nov 2018 23:13:21 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Sam Steingold <address@hidden> writes:
> On Mon, Nov 19, 2018 at 1:30 PM Nicolas Goaziou <address@hidden> wrote:
>> Sam Steingold <address@hidden> writes:
>>
>> > I do not use org, but it
>> > accidentally(https://emacs.stackexchange.com/a/46083/795) came to my
>> > attention that org-macs.el duplicates some emacs stock functionality:
>> >
>> > 1. org-split-string - ignores split-string-default-separators; can
>> > probably be simplified to (split-string string separators nil t)
>>
>> `org-split-string' and `split-string' are slightly different. The former
>> ignores separators at the beginning and at the end of the string, not
>> the latter.
>
> Indeed, and the last argument `t` takes care of this difference.
No, it doesn't.
Notwithstanding the fact that t is not a valid TRIM argument,
`org-split-string' doesn't trim at all:
(org-split-string "|a| b ||c|" "|") => ("a" " b " "" "c")
> The org-split-string I see in git master calls split-string.
It is no longer the case in Org's HEAD. For the record:
(benchmark-run 1000 (org-split-string "|a|b||c|" "|")) => (0.00832757 0 0.0)
(benchmark-run 1000 (split-string "|a|b||c|" "|" nil " ")) => (0.026091297 0
0.0)
Regards,