unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: Off Topic
Date: Thu, 24 May 2018 16:36:59 -0400	[thread overview]
Message-ID: <jwvbmd4kd7z.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 20180524195755.GB4035@ACM

> Yes.  But...  rx.el needs to be _learnt_.  You cannot, at least not yet,
> learn rx.el as an alternative to normal string regexp syntax, because
> the string syntax is so common that it _must_ be learnt.  So rx.el is an
> optional extra.  It seems unlikely that its use could spread beyond
> Emacs, so the effort learning rx.el is going to yield special purpose
> knowledge only.

Very good point.
For me the problem is just that rx.el regexps are too verbose.

>> I like rx.el because its expressions can be navigated structurally, using
>> ‘backward-up-list’, ‘forward-sexp’, and the like. The same commands work on
>> regular regular expressions only if they have not been broken up for
>> readability.
> What would be useful would be a function to turn normal regexps into
> rx.el syntax.

http://elpa.gnu.org/packages/lex.html provides the function
`lex-parse-re` for that.


        Stefan




  parent reply	other threads:[~2018-05-24 20:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7D0B397D-5D1B-4B8C-93B6-1CA207DD552A@scratch.space>
     [not found] ` <E1fKwoI-0000Ug-Lv@fencepost.gnu.org>
     [not found]   ` <A424F9A2-E4C4-47CD-A4B4-E9CEB32A60FD@scratch.space>
     [not found]     ` <A2BA1EF2-D393-43D5-8F44-E802DC705C0A@gnu.org>
2018-05-22  6:58       ` Off Topic (was: bug#31544) Van L
2018-05-23  3:24         ` Richard Stallman
2018-05-23  3:44           ` Van L
2018-05-23 11:06           ` Noam Postavsky
2018-05-24  2:48             ` Richard Stallman
2018-05-24  9:03               ` Off Topic Robert Pluim
2018-05-24 15:20                 ` Eli Zaretskii
2018-05-24 15:41                   ` Robert Pluim
2018-05-24 17:07                     ` Eli Zaretskii
2018-05-25  2:59                     ` Richard Stallman
2018-05-24 16:35               ` Off Topic (was: bug#31544) Alan Mackenzie
2018-05-24 16:53                 ` Yuri Khan
2018-05-24 19:57                   ` Alan Mackenzie
2018-05-24 20:24                     ` Noam Postavsky
2018-05-24 20:36                     ` Stefan Monnier [this message]
2018-05-25  3:01                     ` Richard Stallman
2018-05-25  2:59                   ` Richard Stallman
2018-05-24 17:01                 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvbmd4kd7z.fsf-monnier+gmane.emacs.devel@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).