GNU bug report logs - #36237
Support (rx (and (regexp EXPR) (regexp-quote EXPR)))

Previous Next

Package: emacs;

Reported by: Noam Postavsky <npostavs <at> gmail.com>

Date: Sat, 15 Jun 2019 23:44:02 UTC

Severity: wishlist

Tags: fixed, patch

Merged with 6985

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 36237 <at> debbugs.gnu.org (full text, mbox):

From: Mattias EngdegÄrd <mattiase <at> acm.org>
To: Noam Postavsky <npostavs <at> gmail.com>, 36237 <at> debbugs.gnu.org
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, kevin.legouguec <at> gmail.com
Subject: bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR)))
Date: Sun, 16 Jun 2019 12:03:53 +0200
Thank you! Definitely agree with the need for something like this, although I haven't read the patch in detail yet.
Some notes:

- A more suitable name is needed; `regexp-quote' makes no sense at all in the context of rx. What about `literal'? For simplicity, I'm proceeding with that name below.

- The docs probably need to be explicit about the differences between `literal' and `eval' w.r.t. evaluation time and environment.

- What is now the correct way of including a compile-time regexp expression, such as a defconst? (regexp (eval-when-compile EXPR))? Still a mouthful, but perhaps outside the scope of this bug.

- Thanks for mentioning bug#14769; I'll give it a go.

- I like rx a lot and use it extensively, but the implementation... could be improved (as you no doubt noticed). And so I have: I'm sitting on a full rewrite, code-named `ry'. It's shorter, much cleaner, and about twice as fast (usually more). The only thing still missing is compatibility with the old crusty `rx-constituents' extension mechanism.

The plan was to replace rx with ry entirely when complete. I'll see what it would take to add `literal'.





This bug report was last modified 5 years and 326 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.