From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: immerrr again Newsgroups: gmane.emacs.devel Subject: Re: New rx implementation with extension constructs Date: Thu, 5 Sep 2019 15:34:09 +0300 Message-ID: References: <1C71289F-C5D5-4F9C-947C-374110C1D572@acm.org> <792C9C4D-4C57-4393-9E3B-6166D6A1515E@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="235301"; mail-complaints-to="usenet@blaine.gmane.org" Cc: =?UTF-8?Q?Aur=C3=A9lien_Aptel?= , emacs-devel To: =?UTF-8?Q?Mattias_Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 05 14:36:37 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.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i5r08-000z40-AT for ged-emacs-devel@m.gmane.org; Thu, 05 Sep 2019 14:36:36 +0200 Original-Received: from localhost ([::1]:45570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5r06-0004ku-VD for ged-emacs-devel@m.gmane.org; Thu, 05 Sep 2019 08:36:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36037) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5qy3-0003dq-6v for emacs-devel@gnu.org; Thu, 05 Sep 2019 08:34:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5qy2-0000DB-4s for emacs-devel@gnu.org; Thu, 05 Sep 2019 08:34:27 -0400 Original-Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]:33442) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5qy1-00009c-Tu for emacs-devel@gnu.org; Thu, 05 Sep 2019 08:34:26 -0400 Original-Received: by mail-lj1-x243.google.com with SMTP id a22so2322034ljd.0 for ; Thu, 05 Sep 2019 05:34:22 -0700 (PDT) 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:content-transfer-encoding; bh=nU//y1jAyMg+vZ+glAlsIiAgvKcMs6ZSmdSZAMJbNFg=; b=L0cNqjD/3xv+XHQUHvByknG48CE/50BwkJWSNf/v4dPWs6fDWuwu3zh+/iAeOqlInp ZdMlIvIRBysjIwTSLf7+ANBGnZP2I/tAMLj1+E1jv0fU20GIlosiFvLKqvHX72t3WrEY +Q21ngWs6jg+e8lmGVbgG31CPyF7lKkNCM9bF3pYaHFm+v5MOiZT0K1CwRAzaoa6a7jV Ycj6iTvWHc2zfcWSu7dJTQsu4EK6TjUfhwkqjlDaFIiBlhIuqdUhraV5iEK8z4gAji1n QrdWItlbVxg+3OjbcENEoSrkr4PDCJ7zBKGkPCYcYXtsWqpkKew7mQANWMPlIDEU1r8M 1+ag== 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:content-transfer-encoding; bh=nU//y1jAyMg+vZ+glAlsIiAgvKcMs6ZSmdSZAMJbNFg=; b=L/46Jw7yFguxEgNa/jErg+yV7p5rfvrkFtLNLcH/c7lUCHuNEBwVWOV69uj26e+axJ p06v3iMmHzmBteRnZTUyB0Kj8UyWn5Wg3XYnwm+AdF6F3/3RX8fiQqrI60jQmKbZWM7M /vkd00u/7HO3ljvYZp2sLI1qE/k+IJQLu4jWGoQTV52j8yTVYfasscndJyUnERdCaXq/ Yt2BA/Hqw5lUZYa4eDgCxI4+nDT276veC2MMK+WtB5sTMnmrVW1BkjVz6cPF2BdzjeCG XPq9nUyJRZw2uHhQC6lpWnEDp2qtQYcfGt7qoN9tdosO3XjJ16hsBWXlC3N3AkrUuT6z lj8w== X-Gm-Message-State: APjAAAWQoMhTBXrKbt4b1/wVY8kPRSJwtVcYjzWUCimKWL2AiHtbRAJG 5FMFOmyFRLyg46Lh8jzd4at/jKThNw9ev4HhOMI= X-Google-Smtp-Source: APXvYqxmBC4MVYZIXwSD4YQjtpj3CUBZM7bfTznvftXmgmEd5EW5S8HoHOS8eF1Nu7ygQC2iWd3wbc1jtZUffkWWWXo= X-Received: by 2002:a2e:5c45:: with SMTP id q66mr1845627ljb.197.1567686861225; Thu, 05 Sep 2019 05:34:21 -0700 (PDT) In-Reply-To: <792C9C4D-4C57-4393-9E3B-6166D6A1515E@acm.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::243 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:239868 Archived-At: On Thu, Sep 5, 2019 at 2:18 PM Mattias Engdeg=C3=A5rd wr= ote: > > > Yes, that is the intention. If you find an incompatibility, please report= it. The compatibility includes the old `rx-constituents' variable for ext= ensions, which is used by python-mode. > > The new implementation is slightly more general where this made sense. Fo= r instance, several forms that require at least one argument in current rx = can be used with zero args in the new code. (This includes the `rx' macro i= tself.) > > Other than that, and the new extension mechanism, I've resisted the tempt= ation to add features, but I have a list of things that would be useful to = put in later on. > A bit of a shameless plug: a while ago I wrote a module that did a similar thing, https://github.com/immerrr/ample-regexps.el. Admittedly, I didn't have the time or the energy to get it to completion, or even make it discoverable enough in its current state. But maybe it can be useful for some inspiration at least.