From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.devel Subject: Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification Date: Wed, 10 May 2017 08:03:55 +0900 Message-ID: References: <87vapij1l7.fsf@holos> <6870A2B6-F685-4955-9C0A-256601DB47BC@gmail.com> <51D5E92C-F125-4ADE-8C55-E3513C00ECDC@gmail.com> <8F6958D6-3E13-4C31-B1F8-AF10A8FC8FC6@gmail.com> <838tmafigi.fsf@gnu.org> <7C79DA34-96F2-4D9F-9E9C-01574AE00F12@gmail.com> <8360hefepp.fsf@gnu.org> <0E129E02-FA64-4664-825B-8854A66CA9C6@gmail.com> <3D0BA0E6-02E2-4E90-8A59-121065547E1C@gmail.com> <87ziepho0q.fsf@gnu.org> <83vapderm3.fsf@gnu.org> <87vapdhi9j.fsf@gnu.org> <83tw4xeorf.fsf@gnu.org> <83vapbctij.fsf@gnu.org> <87vapb9dd8.fsf@gnu.org> <877f1qutfq.fsf@drachen> <83wp9qawav.fsf@gnu.org> <0843BD47-5297-4B55-B870-BBE3AEB59D23@gmail.com> <83shkeatlw.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1494371091 489 195.159.176.226 (9 May 2017 23:04:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 9 May 2017 23:04:51 +0000 (UTC) Cc: Michael Heerdegen , Mark Oteiza , Eli Zaretskii , emacs-devel , Tino Calancha To: monnier@iro.umontreal.ca, =?utf-8?Q?Johan_Bockg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 10 01:04:43 2017 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 1d8EBO-0008PS-EW for ged-emacs-devel@m.gmane.org; Wed, 10 May 2017 01:04:42 +0200 Original-Received: from localhost ([::1]:39751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8EBT-00010a-Td for ged-emacs-devel@m.gmane.org; Tue, 09 May 2017 19:04:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8EAp-0000ya-MR for emacs-devel@gnu.org; Tue, 09 May 2017 19:04:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8EAo-0003Ln-QV for emacs-devel@gnu.org; Tue, 09 May 2017 19:04:07 -0400 Original-Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]:34665) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8EAj-0003L4-FG; Tue, 09 May 2017 19:04:01 -0400 Original-Received: by mail-pf0-x22b.google.com with SMTP id e64so6845193pfd.1; Tue, 09 May 2017 16:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=UU0JKH3XRdcCpzgkdTw6RomJD/2NL7or+u+JGLgQWVc=; b=rvZG7TqebQaw851cjoEDBPlPULV+0YHSyohjcYSKVIv51wWBc/sXA8U01hxPAkymDm nQPqiZMds75YELmyT+HU7WLkbBbyoDvCfkcBPqzAtwP3d4VfFkaPpP4tCQDOtCEgtIYo adXBX7GK9s9rFQVWIw8M1CPCUwXxCDy28yNk1j4YpMOPch6FgwZTzMd4oy8YOpgRLV4Q h2/SjyYIk5qgGZIVOifEBe4DTvl9COYpA2TJLVuTaT0VNrihHu4SHGwAxXBUZDV38BDp 7yln+nxjXSf1ZNRD/npZyB77d6m4WQj8e1HPnKgpE/ufPDRH26/Ez1U2bdX2I7iwFZE5 afpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=UU0JKH3XRdcCpzgkdTw6RomJD/2NL7or+u+JGLgQWVc=; b=mZpc3QUuIrDnvg7BOspMk3BozhO+aL+HCDAU5BZI+ObRPM4/DKXADY4ATEv+dBKUaG hLVpJ12fMqocw4V5QvXi+vP2tQsPDb4kb4mzkD/xf9mCctgXneLzTwP0ROqCP2Oqwu7q 32SSZDsDKRqLL3QzzdHSg7Kmjzbd9iXAYZmBv7BwCAhme2fbFr/mubX0AXt9si0e0j+H PXiZdhbFOmhLpKl8xVnv5UBh1nUgQjwJPSqFAosV3962eqUJ65oWj+EQV1HaohjJWEA/ 54mGB2FC22aIf9w7s707IMnxieRsYiOXQ+to5aHx/BgtLYcSXwGrcsugrHCRuzhG9gs/ g3rQ== X-Gm-Message-State: AODbwcDENf9bMP8WH2LIseiItSynCgSoswsi0wBgjN5lZjiA0OWkrxaD Q8fRm9CNvDIIyg== X-Received: by 10.98.19.12 with SMTP id b12mr2669197pfj.21.1494371040483; Tue, 09 May 2017 16:04:00 -0700 (PDT) Original-Received: from [192.168.24.54] (pl25298.ag0304.nttpc.ne.jp. [133.232.153.210]) by smtp.gmail.com with ESMTPSA id e71sm1630481pgc.17.2017.05.09.16.03.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 16:03:59 -0700 (PDT) In-Reply-To: <83shkeatlw.fsf@gnu.org> X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::22b 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:214730 Archived-At: > On May 10, 2017, at 1:21, Eli Zaretskii wrote: >=20 >>> How about if we proceed with the change in string-trim, and file a >>> separate bug against both it and split-string, for such regexps? >>> These seem to be largely unrelated issues, and it's a pity to block >>> Jean-Christophe's changes due to that. >>=20 >> Ok, so we agree that we don't add \\( \\) to the regexp and that we = expect the caller to send a correct regexp as is the case for = split-string, is that correct ? >=20 > _I_ obviously agree, and so do you, but I'd like to hear from others = as well. Johan, Stephan what's your take on this? Since what I propose is consistant with the existing code, not agreeing = with that means *first* finding the bug that Johan mentioned (which is = not directly related to my modification), starting a review process of = the whole code base that uses subr.el/split-string (and maybe other = places where that regexp bug happens), fixing the code to ensure some = kind of backward compatibility, etc. and *then* applying my change to = subr-x... While we could first change subr-x (string-trim...) so that they behave = similarly to split-string and then start the bug hunting... Jean-Christophe=