Subject: bug#31953: [VanL] Re: bug#31953: feature request - `highlight-rx` interactively

From: VanL <[email-masked]>
Date: Sun, 20 Oct 2019 17:34:37 +1100

Phil Sainty <[email-masked]> writes:

> On 2019-10-15 13:35, Lars Ingebrigtsen wrote:
>>> I was wanting to migrate from regexp to rx syntax for highlighting.
>>
>> `rx' returns a normal regexp, so you can use whatever you want, can't
>> you?
>
> I think the idea is to be able to *interactively* enter rx syntax
> and have it highlighted (as opposed to `highlight-regexp' which will
> obviously treat what you enter interactively as an actual regexp,
> rather than something to be transformed into one).
>
> i.e. These would be equivalent:
>
> M-x highlight-rx RET (or "foo" "bar") RET
> M-x highlight-regexp RET \(foo\|bar\) RET

What I can tell from the emacs-devel list and the git log is the rx
feature is being worked on.  I'd like to use rx everywhere regexp occurs
and highlight-rx would be the first easy use case.  At the limit there
are things expressible in regexp that rx won't be able to.  And, in that
case, I'd like to see in the rx documentation a sign post to regexp at
depth for that.  And, if there are patterns rx and/or regexp are unable
to express then providing a see also for those would be a help.