From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: modern regexes in emacs Date: Fri, 15 Feb 2019 19:14:47 +0000 Message-ID: <20190215191447.GB5438@ACM> References: <20180616123704.7123f6d7@jabberwock.cb.piermont.com> <87po0qs6re.fsf@gmail.com> <83r2c9m8yj.fsf@gnu.org> <17581DA9-7DCA-432E-A2E8-E5184DFA8B4B@acm.org> <20190215114728.0785e891@jabberwock.cb.piermont.com> <20190215175405.GA5438@ACM> <83lg2gnbky.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="183536"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: mattiase@acm.org, lokedhs@gmail.com, emacs-devel@gnu.org, philippe.vaucher@gmail.com, jaygkamat@gmail.com, perry@piermont.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 15 20:18:16 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1guj03-000la0-Or for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2019 20:18:15 +0100 Original-Received: from localhost ([127.0.0.1]:44972 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guj02-000448-NM for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2019 14:18:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guizr-00043K-Fz for emacs-devel@gnu.org; Fri, 15 Feb 2019 14:18:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guizq-00056u-FP for emacs-devel@gnu.org; Fri, 15 Feb 2019 14:18:03 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:49842 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1guizq-00052W-4T for emacs-devel@gnu.org; Fri, 15 Feb 2019 14:18:02 -0500 Original-Received: (qmail 68169 invoked by uid 3782); 15 Feb 2019 19:18:00 -0000 Original-Received: from acm.muc.de (p4FE15EA1.dip0.t-ipconnect.de [79.225.94.161]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 15 Feb 2019 20:17:59 +0100 Original-Received: (qmail 20703 invoked by uid 1000); 15 Feb 2019 19:14:47 -0000 Content-Disposition: inline In-Reply-To: <83lg2gnbky.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 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:233393 Archived-At: Hello, Eli. On Fri, Feb 15, 2019 at 20:36:13 +0200, Eli Zaretskii wrote: > > Date: Fri, 15 Feb 2019 17:54:05 +0000 > > From: Alan Mackenzie > > Cc: Mattias Engdegård , lokedhs@gmail.com, > > emacs-devel@gnu.org, Philippe Vaucher , > > jaygkamat@gmail.com, Eli Zaretskii > > > Anyway, I recommend Eli's approach. We create a parallel set of > > > modernized syntax functions, and people can slowly adopt them. > > I suggest we retain our current regexp notation, together with compatible > > tools, as the sole way of writing regexps in Emacs. This notation is not > > all that bad, and it is thoroughly documented and well tested. It's the > > approach which will cause the least confusion. It works. > I proposed to have a separate set of functions that will accept PCRE > syntax. That would allow everyone to have what they want: you to use > the "classic" regexps, and those who want PCRE to have that. Where's > the problem with that? This will end up with a mixture of the two incompatible styles of regexp in the Emacs sources. I can see there being such a mixture even within single source files. This will be confusing to everybody, particularly to beginners. Regexps are difficult. Whether one has to escape a literal parenthesis, or a parenthesis used as a grouping token makes little difference, IMAO, to the overall difficulty of regexps. And we will have yet one more technical choice where "modernists" will attempt to force "traditionalists" to do what the "modernists" want. This was even explicit in somebody's post in this thread (though they pretended that it would just happen without force). I think the costs of an alternative regexp style will outweight any benefits, and this will affect everybody, not just those in favour of some alternative style. -- Alan Mackenzie (Nuremberg, Germany).