From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: modern regexes in emacs Date: Fri, 15 Feb 2019 11:06:52 -0500 Message-ID: References: <20180616123704.7123f6d7@jabberwock.cb.piermont.com> <87po0qs6re.fsf@gmail.com> <83r2c9m8yj.fsf@gnu.org> <20190215102821.162fe37a@jabberwock.cb.piermont.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="35271"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 15 17:16:06 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 1gug9m-000949-HC for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2019 17:16:06 +0100 Original-Received: from localhost ([127.0.0.1]:42279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gug9l-0001XU-GV for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2019 11:16:05 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gug17-00040V-Bc for emacs-devel@gnu.org; Fri, 15 Feb 2019 11:07:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gug11-0004sS-HX for emacs-devel@gnu.org; Fri, 15 Feb 2019 11:07:07 -0500 Original-Received: from [195.159.176.226] (port=34450 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gug0y-0004hC-9x for emacs-devel@gnu.org; Fri, 15 Feb 2019 11:07:03 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1gug0u-0014ij-T0 for emacs-devel@gnu.org; Fri, 15 Feb 2019 17:06:56 +0100 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:ba4yWZz4hz6nknU0acQTb8sH+h4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:233382 Archived-At: >> 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. A simpler option is for Elisp users to write (pcre "foo") where `pcre` is a function that converts to Emacs's own format. I think it would make a lot of sense for Emacs's search functions to accept other kinds of search specifications than regular expressions represented as strings, e.g. to also accept precompiled regexps (or NFAs/DFAs), so `pcre` could also return one of those representations if/when support for it is added. Stefan