Subject: Re: bug#50136: 28.0.50; A problem with rx-let expansion

From: Michael Heerdegen <[email-masked]>
Date: Fri, 20 Aug 2021 16:50:01 +0200

Michael Heerdegen <[email-masked]> writes:

> #+begin_src emacs-lisp
> (rx-let ((scatter (s) (regex (mapconcat #'string (string-to-list s) ".*"))))
>   (rx (scatter "abc"))) ==> "a.*b.*c"
> #+end_src

AFAIU, the current approach doesn't allow to extend this with an
optional CHARS argument to specify with chars are allowed "in between"
(instead of "any").  The "&optional" keyword makes it barf.

And I can't actually "look" at the arguments to provide a conditional
replacement.  All I can do is to use `regex' to eval a constant
expression I specify (at run-time).  This seems a quite limiting
approach.  Something more macro-like would be appropriate IMO.

Michael.