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?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: modern regexes in emacs Date: Fri, 15 Feb 2019 10:13:41 -0500 Message-ID: <3930cc17-ce50-d269-cef2-a43ce9811bce@gmail.com> References: <20180616123704.7123f6d7@jabberwock.cb.piermont.com> <87po0qs6re.fsf@gmail.com> <387b4e87-2255-0467-c23e-e60c6b090fb3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="238660"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 Cc: Emacs developers To: Philippe Vaucher Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 15 16:14:23 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 1gufC3-000zyo-HA for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2019 16:14:23 +0100 Original-Received: from localhost ([127.0.0.1]:41376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gufC2-0004ts-FX for ged-emacs-devel@m.gmane.org; Fri, 15 Feb 2019 10:14:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gufBc-0004e1-U9 for emacs-devel@gnu.org; Fri, 15 Feb 2019 10:13:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gufBc-0000LL-5p for emacs-devel@gnu.org; Fri, 15 Feb 2019 10:13:56 -0500 Original-Received: from mail-qt1-x834.google.com ([2607:f8b0:4864:20::834]:36065) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gufBb-0008Vq-Uy for emacs-devel@gnu.org; Fri, 15 Feb 2019 10:13:56 -0500 Original-Received: by mail-qt1-x834.google.com with SMTP id p25so10926434qtb.3 for ; Fri, 15 Feb 2019 07:13:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=WmejlmJCThp00L5XOdTxWT+hDPzyKmVABK6atmRiUb4=; b=NjdbUol10a46Bt+zL8tLa8deSCZJVwvNN98ExDdleC/TCSPXYPOH8deB6A3UXFnVJZ kAsbLKl5pZBfjqZynxA+4A4RbFFulsfR0YevVOQMJ6QIVcVe2ncXh5v0qzofH+zJJwm4 Rd3rWZ+aeURDtWIufpEbb3MD3CFIJrVBzj6CNjKRehezWBbCd3i+SBjgkgxhMfc4Gal3 JiOegGasrB09tkx1P+kzVlgsHTF0ejFqldnVxRdPGouhZ6XWx5LaBg2Z3jwllASxXY5F mZfaFqGdGPddvw8QkYTj1ONKSrSdpoi1LF7t6YvwGHfUMqMuKNZSpdCxa6onVALWPBNI dBEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WmejlmJCThp00L5XOdTxWT+hDPzyKmVABK6atmRiUb4=; b=k7X9UdMS8yqRpqm7OBBVUdwWRGLyX5jPD7dVXpfx5aIw88R006GBGD+cfMd9DD9S+0 e4YB5410ogYXkgSS/KqQRHenSd/NeIcSGDbr06ga+VONTvVEGUVqRNUevEmxERJP+aaa FimieIpzZoDBBynpWvI7Daz/ifRDlxtQUno5fAa015w7cg0uzcEQfhcmgjGuVwIvRdaU QikP2tkDNGVGJHHAvNUwIgcH8AqHTSCLszflVR9FEgOVDaMiJ+K5jS3AHTh88Jva1GCU mT1drXEx1KdykW2i2Xv5OuVm+B/S4hGCspS9eBlNnvuZOCKZ1Aru8JshPRVpaTFb4DoW FWvw== X-Gm-Message-State: AHQUAuY+8Kw6uGNI3u3Xvzd3qJnIzhC33rjufBGIFq5REti9saGeSK53 j8KvEH9Chfu+EtL5O629ytxSzrZ8 X-Google-Smtp-Source: AHgI3Iaqvei3UbtHpKtn/M6Fj0FqJaiMvdrosiiRixvUdbyhSes7qiaZJPvGGCSsYFnoedjKb9a6oA== X-Received: by 2002:ac8:3f46:: with SMTP id w6mr8135261qtk.175.1550243622962; Fri, 15 Feb 2019 07:13:42 -0800 (PST) Original-Received: from ?IPv6:2601:184:4180:66e7:f0cc:8c46:f643:1be8? ([2601:184:4180:66e7:f0cc:8c46:f643:1be8]) by smtp.googlemail.com with ESMTPSA id a3sm3684315qta.21.2019.02.15.07.13.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Feb 2019 07:13:42 -0800 (PST) In-Reply-To: Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::834 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:233377 Archived-At: On 15/02/2019 10.03, Philippe Vaucher wrote: > Given this I'm in favor of the 2nd option, but maybe I missed some points. Thinking more about this, there is one non-trivial issue: concatenation. It's common for code in Emacs to take a regexp, assume it's a string, and do something like (concat "\\(" some-regexp-var "\\|" some-other-regexp-var "\\)"). Solution 1 could be tweaked to wrap the whole regexp: "\\(?pcre:…[pcre regexp here]…\\)", and so could solution 3 (a text property spanning the whole length of the string), but solution 2 won't work well here. Not to mention the fact that if the regexps are matched by different engines, we now have to make these work together :/ Clément.