GNU bug report logs - #23795
24.5; rx eval on variable gives symbol error

Previous Next

Package: emacs;

Reported by: bgoodr <at> gmail.com

Date: Sat, 18 Jun 2016 15:51:01 UTC

Severity: normal

Found in version 24.5

Done: Andreas Schwab <schwab <at> linux-m68k.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 23795-done <at> debbugs.gnu.org (full text, mbox):

From: Brent Goodrick <bgoodr <at> gmail.com>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 23795-done <at> debbugs.gnu.org
Subject: Re: bug#23795: 24.5; rx eval on variable gives symbol error
Date: Sat, 18 Jun 2016 09:21:03 -0700
[Message part 1 (text/plain, inline)]
Understood. Thanks Andreas.

On Sat, Jun 18, 2016 at 9:19 AM, Andreas Schwab <schwab <at> linux-m68k.org>
wrote:

> bgoodr <at> gmail.com writes:
>
> > Insert this into a .el file and load it in using emacs -Q:
> >
> > (let ((page-name "the page"))
> >        (let ((regexp
> >             ;; (concat "[[" page-name "]]")
> >             (rx "[[" (eval page-name) "]]" )))
> >        regexp
> >        ))
>
> Since rx is a macro it cannot refer to runtime values.  You need to use
> rx-to-string to construct the regexp at run time.  Or just use concat as
> in the comment.
>
> Andreas.
>
> --
> Andreas Schwab, schwab <at> linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
>
[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 29 days ago.

Previous Next


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