From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: rx.el sexp regexp syntax Date: Tue, 29 May 2018 10:27:54 +0200 Message-ID: References: <87h8mw3yoc.fsf@gmail.com> <20180525155126.GA4096@ACM> <87lgc7hebk.fsf@gmail.com> <87r2lzd375.fsf@ericabrahamsen.net> <8736ybpwhh.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000073ef46056d540315" X-Trace: blaine.gmane.org 1527582369 1102 195.159.176.226 (29 May 2018 08:26:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 29 May 2018 08:26:09 +0000 (UTC) Cc: emacs-devel@gnu.org, Pierre Neidhardt To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 29 10:26:04 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fNZxE-0000Av-Fv for ged-emacs-devel@m.gmane.org; Tue, 29 May 2018 10:26:04 +0200 Original-Received: from localhost ([::1]:59590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNZzL-0008WP-Gt for ged-emacs-devel@m.gmane.org; Tue, 29 May 2018 04:28:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNZzE-0008W6-Bk for emacs-devel@gnu.org; Tue, 29 May 2018 04:28:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNZzD-0003pA-DX for emacs-devel@gnu.org; Tue, 29 May 2018 04:28:08 -0400 Original-Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:34393) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNZzD-0003oe-8P for emacs-devel@gnu.org; Tue, 29 May 2018 04:28:07 -0400 Original-Received: by mail-oi0-x22e.google.com with SMTP id l1-v6so12314613oii.1 for ; Tue, 29 May 2018 01:28:07 -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; bh=dSVhJw3ui6Ko5wJej4/1RRfFInzebKqKniCbOCxCagw=; b=LMjJCoC4rv2FoHNFGndenI+j6yncWfaTOWNN+v6tj/CKlVqwzBtNbfo9lO0U2w983R WydKc1MkS/nmvShSHwXZY2xCLLad82pbm7trVq9E78z95yuphpf74bD/vgdjOrT3fAuz 0fGOzDJAU5wwd3F55Lbg/WHfXj3pNlW02KEtvTSe65y4SUk9GS9dSzYxFQW4QEOJUrUu K2MYX1RlvP5FJCje9+TvcymLeq3DfkiU+w9puKKSG6Z8Z0WU3nGuT0duI7qnTuN+Kqzu d4iDCpJ5yLzWYl4QOqL9xeESixzd6mJfrnfuBYQ+Fkyi5Us9s8W2AQw729Z1MMqvXuGn ZdwA== 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=dSVhJw3ui6Ko5wJej4/1RRfFInzebKqKniCbOCxCagw=; b=s/iTAWS7WamceOghfBuHIwvXWauoJtDhoZ/ctBTs5iiWy0rQJHjaCVs7yEuQjaUfau X2O+zl/6wvt2SNjT4e+Aw1En12RjXM6KUXspFcIFpYmUQGIaksHC5ypmeXQgsOdBh8KI 15XU0ethZCxKgRqWzf4oMI79w6Cro98wL5+fbM8LDeNI5os9e1EoVhrW7uPHV23uwiIo 8ZSWcvN/fdzQPTly9e6S6xIkWoLou/WIm5YWKWjX+9Rcs01XMoRLzmSs/qfDGEmKMnz0 aSe8npWhKuVKoa7u1ganx8yjpz18BiF/JcXMaSwIYaEPCyXLG6ERe4o+cclXtGwXm4P1 072g== X-Gm-Message-State: ALKqPwfOfW0erepex1tj41DSmF48R0IcuDwOpWl679Bi9pWBhZQ2J0nT iluop7Py4cxxh8TvLkimZQOk6GI2qJSr344vTPo= X-Google-Smtp-Source: ADUXVKKrODsaZXPR/dJ4OWSAgP6L5el1T+7EjXexLfbX/TSETXQCN1ajmgJvYon+ENlxQDaQPSIE3zFCUAQ8JnuCtcc= X-Received: by 2002:aca:d906:: with SMTP id q6-v6mr8711923oig.349.1527582486161; Tue, 29 May 2018 01:28:06 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::22e 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:225796 Archived-At: --00000000000073ef46056d540315 Content-Type: text/plain; charset="UTF-8" Stefan Monnier schrieb am Mo., 28. Mai 2018 um 19:16 Uhr: > >>> brutal regexp, but what I *would* use all day long would be a macro > that > >>> un-escaped backslashes for me. Ideally: > >> That'd be a good first step. > >> A second important step would be to easily embed comments and Elisp code > >> (mostly references to other Elisp variables). > > rx.el can do all that (with "eval") if I'm not mistaken. > > The main problem of RX is not lack of features, but verbosity which for > me makes it disappointingly difficult to read (not always worse than > string regexps, admittedly, but still). > > FWIW, I think its verbosity is RX's main *advantage*. It makes regular expressions so much easier to read that I stopped writing regex strings the moment I discovered RX. --00000000000073ef46056d540315 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Stefan= Monnier <monnier@iro.umontr= eal.ca> schrieb am Mo., 28. Mai 2018 um 19:16=C2=A0Uhr:
>>> brutal regexp, but what I *would* = use all day long would be a macro that
>>> un-escaped backslashes for me. Ideally:
>> That'd be a good first step.
>> A second important step would be to easily embed comments and Elis= p code
>> (mostly references to other Elisp variables).
> rx.el can do all that (with "eval") if I'm not mistaken.=

The main problem of RX is not lack of features, but verbosity which for
me makes it disappointingly difficult to read (not always worse than
string regexps, admittedly, but still).


FWIW, I think its verbosity is RX's ma= in *advantage*. It makes regular expressions so much easier to read that I = stopped writing regex strings the moment I discovered RX.=C2=A0
=
--00000000000073ef46056d540315--