all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Sam Steingold <sds@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: org-macs ignoring stock functionality
Date: Mon, 19 Nov 2018 23:13:21 +0100	[thread overview]
Message-ID: <878t1oemwu.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAFsbZ7Y_VqfDDj61K5Lk7ZsdbiOQtVgYJDRHsS-eLLoFe3sfHA@mail.gmail.com> (Sam Steingold's message of "Mon, 19 Nov 2018 16:01:36 -0500")

Sam Steingold <sds@gnu.org> writes:

> On Mon, Nov 19, 2018 at 1:30 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>> Sam Steingold <sds@gnu.org> 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,



      reply	other threads:[~2018-11-19 22:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 14:13 org-macs ignoring stock functionality Sam Steingold
2018-11-19 18:30 ` Nicolas Goaziou
2018-11-19 21:01   ` Sam Steingold
2018-11-19 22:13     ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878t1oemwu.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-devel@gnu.org \
    --cc=sds@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.