From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Nicolas Goaziou Newsgroups: gmane.emacs.devel Subject: Re: org-macs ignoring stock functionality Date: Mon, 19 Nov 2018 23:13:21 +0100 Message-ID: <878t1oemwu.fsf@nicolasgoaziou.fr> References: <87ftvwex8g.fsf@nicolasgoaziou.fr> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1542665534 27481 195.159.176.226 (19 Nov 2018 22:12:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 19 Nov 2018 22:12:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: emacs-devel@gnu.org To: Sam Steingold Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 19 23:12:10 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOrm3-00071k-W6 for ged-emacs-devel@m.gmane.org; Mon, 19 Nov 2018 23:12:08 +0100 Original-Received: from localhost ([::1]:59191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOroA-0001bC-LQ for ged-emacs-devel@m.gmane.org; Mon, 19 Nov 2018 17:14:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOrnT-0001Za-Ks for emacs-devel@gnu.org; Mon, 19 Nov 2018 17:13:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOrnM-0003qA-7S for emacs-devel@gnu.org; Mon, 19 Nov 2018 17:13:33 -0500 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:51603) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOrnK-0003nr-OT; Mon, 19 Nov 2018 17:13:28 -0500 X-Originating-IP: 185.131.40.67 Original-Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 55C44E0008; Mon, 19 Nov 2018 22:13:24 +0000 (UTC) In-Reply-To: (Sam Steingold's message of "Mon, 19 Nov 2018 16:01:36 -0500") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.70.183.196 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231238 Archived-At: Sam Steingold writes: > On Mon, Nov 19, 2018 at 1:30 PM Nicolas Goaziou wrote: >> Sam Steingold 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,