From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Trimming strings, /emacs/lisp/emacs-lisp/subr-x.el modification Date: Wed, 10 May 2017 07:55:17 -0400 Message-ID: References: <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> <50036084-C652-4382-A1F5-500C81916703@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1494417368 7178 195.159.176.226 (10 May 2017 11:56:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 10 May 2017 11:56:08 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 10 13:56:02 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 1d8QDq-0001ix-Lk for ged-emacs-devel@m.gmane.org; Wed, 10 May 2017 13:56:02 +0200 Original-Received: from localhost ([::1]:42072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8QDw-0000k5-5S for ged-emacs-devel@m.gmane.org; Wed, 10 May 2017 07:56:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8QDN-0000jo-Rq for emacs-devel@gnu.org; Wed, 10 May 2017 07:55:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8QDJ-0003cI-0L for emacs-devel@gnu.org; Wed, 10 May 2017 07:55:33 -0400 Original-Received: from [195.159.176.226] (port=36823 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d8QDI-0003c9-Pj for emacs-devel@gnu.org; Wed, 10 May 2017 07:55:28 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1d8QD8-0000fa-Uk for emacs-devel@gnu.org; Wed, 10 May 2017 13:55:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 15 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:B2N+pZzIOcfCDW1T8RYk7JWXtNk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:214754 Archived-At: >> I'm pretty sure surrounding the regexp in \(?:..\) will break no code >> at all. To me it's an absolute no-brainer that doesn't even merit >> any discussion. > That does not seem to be the case. Johan has identified a case > where a regexp that uses \| does not produce the same result as the "trim" > argument of split-string whether it uses \( \) or not. Of course it doesn't behave the same (otherwise, why bother changing it): "I'm pretty sure surrounding the regexp in \(?:..\) will break no code at all" doesn't mean that such code can't exist, but that I expect such code not to exist in the wild (or if it exists, it *suffers* from the current behavior rather than benefitting from it). Stefan