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


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Mattias EngdegÄrd <mattiase <at> acm.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 36237 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>, kevin.legouguec <at> gmail.com
Subject: bug#36237: Support (rx (and (regexp EXPR) (regexp-quote EXPR)))
Date: Sun, 16 Jun 2019 07:34:49 -0400
First, thanks Noam, this is a very welcome improvement.
[ BTW, please use "--" for rx-compile-to-lisp since I believe it's
  internal.  ]

What do regexp and regexp-quote do in rx-to-string?

> - 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.

I'll let others figure that one out.

> - 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.

FWIW, I have the impression that in most cases where this could be
useful, a better solution would be to provide something like
`rx-defmacro` and/or `rx-macrolet`.


        Stefan





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.