From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: modern regexes in emacs Date: Fri, 15 Feb 2019 17:24:18 +0100 Message-ID: <17581DA9-7DCA-432E-A2E8-E5184DFA8B4B@acm.org> References: <20180616123704.7123f6d7@jabberwock.cb.piermont.com> <87po0qs6re.fsf@gmail.com> <83r2c9m8yj.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="82285"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Philippe Vaucher , jaygkamat@gmail.com, lokedhs@gmail.com, emacs-devel@gnu.org, "Perry E. Metzger" To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 15 17:25:04 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 1gugIS-000LHf-Ar for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2019 17:25:04 +0100 Original-Received: from localhost ([127.0.0.1]:42458 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gugIR-0000Ql-3k for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2019 11:25:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gugID-0000P2-Ow for emacs-devel@gnu.org; Fri, 15 Feb 2019 11:24:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gugIB-0005lT-2p for emacs-devel@gnu.org; Fri, 15 Feb 2019 11:24:48 -0500 Original-Received: from mail221c50.megamailservers.eu ([91.136.10.231]:40810 helo=mail33c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gugI7-0005Hh-Sl; Fri, 15 Feb 2019 11:24:46 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1550247862; bh=2wmUwV/PvdU2Mu52Zg57eNUcN7x5HURI6Po7+1DHV2g=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=livrQNttHdb3/47kPE5vMQzD1knSaG3AnId2KGbxWlw/C7vXk+JKqsaZTv/Xz4vDF 7amlYzkbBwkoqkg6KkCp+dNoLDogaGDxFMwi2tqwiX23N3Z1XtmFdnI47uo97M/FI5 neHso7qR98vMMgvthI1avpwOMcQZeRgZ0+ZX2Px8= Feedback-ID: mattiase@acm.or Original-Received: from [192.168.0.4] (c83-251-8-17.bredband.comhem.se [83.251.8.17]) (authenticated bits=0) by mail33c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id x1FGOJbW008360; Fri, 15 Feb 2019 16:24:21 +0000 In-Reply-To: <83r2c9m8yj.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.102.3) X-CTCH-RefID: str=0001.0A0B020F.5C66E7B6.003D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=fZaDNXYF c=1 sm=1 tr=0 a=NAHmi3I8mP0S/Y8gRKeQyA==:117 a=NAHmi3I8mP0S/Y8gRKeQyA==:17 a=kj9zAlcOel0A:10 a=mDV3o1hIAAAA:8 a=aKw7N9ivCfcsSiBrTnkA:9 a=CjuIK1q_8ugA:10 a=_FVE-zBwftR9WsbkzFJk:22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 91.136.10.231 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:233383 Archived-At: 15 feb. 2019 kl. 15.18 skrev Eli Zaretskii : >=20 > It should be possible if we introduce new functions for PCRE, or if we > mark PCRE regexps in some special way, like put a special text > property on the string. It would be easier if those who ask for PCRE would say exactly what they = want: (1) The syntax of PCRE -- | () {} instead of \| \(\) \{\} etc -- but = restricted to the set of features of the Emacs regexp engine. (2) The features of PCRE not present in Emacs regexps. Which ones, = exactly? Lookbehind assertions? Atomic groups? (3) PCRE for interactive use only. (4) PCRE for general Elisp programming. Locating and wrapping the places that ask for regexps interactively, = such as `query-replace-regexp', would permit the interactive regexp = syntax to become a simple user customisation -- traditional, PCRE, rx or = whatnot. It would be a matter of writing a transformation function, and = possibly some syntax highlighting, for each case. I wouldn't be surprised if 99% of the requests are really about not = having to escape |(){} as metacharacters in interactive use.