emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] A program to overlay Elisp regular expressions in rx form


From: Daniel Martín
Subject: Re: [PATCH] A program to overlay Elisp regular expressions in rx form
Date: Mon, 16 Nov 2020 20:20:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin)

Clément Pit-Claudel <cpitclaudel@gmail.com> writes:

> On 11/15/20 6:16 AM, Daniel Martín wrote:
>> Is there general interest in this kind of functionality as a free
>> program?  I don't know if this could be a new feature of the xr package
>> (most probably), or if it could be its own separate package.
> This is very nice.  I have a version of this in my local Emacs config,
> but it's on by default and it doesn't put the buffer in read-only
> more: it uses an overlay to display the rx regexp instead of the
> string-based one instead.  I've attached the code if you want to have
> a look; what's missing is logic to automatically "unprettify" the
> regexp when the point is in it, to make edits easy.
>
> I was originally planning to include this in the easy-escape package, but I 
> haven't found the time to do it, so feel free to go ahead :)
>
> Clément.

Thanks for the link, your approach looks simpler, which is nice.  As you
said, the workflow is a little bit different: Your package prettifies
every regular expression at once and mine does so on a case by case
basis; I think it's a matter of preference.  I also prettify the final
rx form to make it more readable.

I didn't know about the easy-escape package.  I see it was suggested to
be included in Emacs core around 2017, but there were no responses back
then.  Maybe we could have this kind of functionality at least in ELPA?
I think it's a generally useful package.


reply via email to

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