emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Off Topic


From: Stefan Monnier
Subject: Re: Off Topic
Date: Thu, 24 May 2018 16:36:59 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]