bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR)))


From: Mattias Engdegård
Subject: bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR)))
Date: Tue, 18 Jun 2019 21:45:57 +0200

16 juni 2019 kl. 14.25 skrev Noam Postavsky <npostavs@gmail.com>:

>>> The plan was to replace rx with ry entirely when complete.
> 
> How far away is this?  Would it make sense to delay this bug until "ry"
> comes in?

The function-complete ry has been put at https://gitlab.com/mattiase/ry for the 
time being. It should now be entirely compatible, including support for 
`rx-constituents'. Your proposed `literal' was also added, which was 
instructive; I needed to know how it would fit in.

Bootstrapping Emacs with it (ry renamed to rx, of course) works, including 
python-mode which uses `rx-constituents' for extension. It also has fewer of 
the known bugs of the current rx, and a much more extensive test suite.

There are two things that perhaps need to be resolved before replacing the 
current rx:

1. Is there externally developed elisp code that makes use of internal rx 
functions and variables, perhaps for extension purposes, and do we need to 
worry about breaking it? The code is old enough not to delineate internal and 
public symbols clearly (no double-dash), which means that people may have gone 
and used all sort of things.

2. What would a good extension mechanism look like, and should one be put into 
place right away, so that we can point to a decent replacement for the internal 
toys that users relied upon?

Noam, unless the consensus is that ry is unequivocally as good or better than 
rx, you could just as well apply your patch (suitably fixed up). Even if later 
replaced, there is nothing fundamentally wrong with the design; let's not hold 
it hostage.






reply via email to

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