From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Philippe Vaucher Newsgroups: gmane.emacs.devel Subject: Re: modern regexes in emacs Date: Mon, 18 Feb 2019 09:40:26 +0100 Message-ID: References: <20180616123704.7123f6d7@jabberwock.cb.piermont.com> <87po0qs6re.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000179ae9058227154f" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="237112"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 18 09:41:42 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 1gveUf-000zZM-FE for ged-emacs-devel@m.gmane.org; Mon, 18 Feb 2019 09:41:41 +0100 Original-Received: from localhost ([127.0.0.1]:54647 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gveUe-0000ZC-FE for ged-emacs-devel@m.gmane.org; Mon, 18 Feb 2019 03:41:40 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gveTy-0000Z6-9F for emacs-devel@gnu.org; Mon, 18 Feb 2019 03:40:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gveTx-0002t9-9Z for emacs-devel@gnu.org; Mon, 18 Feb 2019 03:40:58 -0500 Original-Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]:39609) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gveTw-0002qs-UN for emacs-devel@gnu.org; Mon, 18 Feb 2019 03:40:57 -0500 Original-Received: by mail-lj1-x229.google.com with SMTP id g80so13599266ljg.6 for ; Mon, 18 Feb 2019 00:40:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7Te8Q2QxbwjhMpwkHfGd13tT9Qz3tGCUrAo93JRFPD0=; b=jLXRsDqVxaE+w9Xhmy1LFhxkLU343KosanBJT4GqrdXqiD0H4Jt87Dd3I+1Z0ttg50 K0zXtleJOqOpSNtXJgJYmJ9qEEot+9KNg8pehTmVXPZs2X43/klVm5VUfiHPrPmxQZfq ElzDyZyBmVvHz1/EyDd8i+h7zkPNlXvpveyZ8LzqG+5ATrJQwBuW6ifY32g/HK/cuaY4 r3ODEQpgxRwe2X0JQdiq56PNraRpuhXk9wgAsWw43nJ8GXZKE5fdblKQkHVItgXpYFN4 pVoTIfZ1GHauryOdDMMduaaEPlAkqMyJmVIe/C2UK5M3FtYaniBNYhdP2LVDe2BFLZed uwDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7Te8Q2QxbwjhMpwkHfGd13tT9Qz3tGCUrAo93JRFPD0=; b=f+wRX9m5wRbV2NHHWEQBLWp/TNMYZFH4T9tujBhIbkIf8sjLRAWCZYWY++FNKlH1eC GnM0nfcVKluvPEM8c9rHBBkJ9JLIYvCGJzyffsjRKemZsCbHnpyRjWYHUhaeAVmrFVhi 571bdnXQfgkbWon5aeaLoHOrpJFScWdpPKA5mEYt/hNy+QKDFtSAgks4q23EOs2TnDxZ 8DVoRV2QnbuHKbZ23UkhrDhqmTeRz0owX1SH/pti3XkWuMgeYB58xvR2tE+Civqqxtzr M3OBB10DldUS/fIjvJ77XM3f6OmMoSv5RVcY9Qkf3cflSO3voBohqpI4xC6Tbc1BOODr I+mQ== X-Gm-Message-State: AHQUAuaskIpBkWDSg4FbKfcektth1n1U2p+Y9GvrbWrEnzQmbbNqyBk3 OjNc3rT/1dxsTHEGdDYe1TQXyebGLO4LxRKL7AErINaN X-Google-Smtp-Source: AHgI3IZsKvDJdkcroFPp/R0vD95BVZ985YVPo4ZkOC5lEP1/5IUOrpUwIfiROlwchp30H0yxLNzc7XmzXwyLuCC1+Aw= X-Received: by 2002:a2e:8315:: with SMTP id a21mr985506ljh.193.1550479252755; Mon, 18 Feb 2019 00:40:52 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::229 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:233440 Archived-At: --000000000000179ae9058227154f Content-Type: text/plain; charset="UTF-8" > > Other than isearch, most other commands should (ideally) read their > regexps interactively with `read-regexp`, so it should be easy for > a third party package to advise `read-regexp` so it accepts the PCRE > syntax (or the RX syntax, ...) and then converts it to Emacs's > own syntax. Shouldn't break any package at all. > This is what `pcre-mode` does in pcre2el https://github.com/joddie/pcre2el/blob/master/pcre2el.el#L707 The package pcre2el is already quite satisfying for me, but given it requires a bit of updates to work and is always a bit kludgy due to having to fight emacs, I would like for Emacs to give better PCRE support so packages like this become obsolete or really trivial to write. --000000000000179ae9058227154f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Other than isearch, most other commands= should (ideally) read their
regexps interactively with `read-regexp`, so it should be easy for
a third party package to advise `read-regexp` so it accepts the PCRE
syntax (or the RX syntax, ...) and then converts it to Emacs's
own syntax.=C2=A0 Shouldn't break any package at all.
<= div>
This is what `pcre-mode` does in pcre2el=C2=A0https://git= hub.com/joddie/pcre2el/blob/master/pcre2el.el#L707

=
The package pcre2el is already quite satisfying for me, but given it r= equires a bit of updates to work and is always a bit kludgy due to having t= o fight emacs, I would like for Emacs to give better PCRE support so packag= es like this become obsolete or really trivial to write.

--000000000000179ae9058227154f--