From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#23795: 24.5; rx eval on variable gives symbol error Date: Sat, 18 Jun 2016 18:19:03 +0200 Message-ID: <87lh228o7c.fsf@linux-m68k.org> References: <22373.28050.673856.847792@gargle.gargle.HOWL> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1466266831 30006 80.91.229.3 (18 Jun 2016 16:20:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jun 2016 16:20:31 +0000 (UTC) Cc: 23795-done@debbugs.gnu.org To: bgoodr@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 18 18:20:17 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bEIym-0006h9-Lz for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Jun 2016 18:20:16 +0200 Original-Received: from localhost ([::1]:35536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEIyl-0003kx-Tf for geb-bug-gnu-emacs@m.gmane.org; Sat, 18 Jun 2016 12:20:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEIyd-0003gj-Q3 for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2016 12:20:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEIyY-0008HY-N9 for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2016 12:20:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEIyY-0008HU-Jd for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2016 12:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bEIyY-00085q-Bw for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2016 12:20:02 -0400 Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jun 2016 16:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 23795 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 23795@debbugs.gnu.org, schwab@linux-m68k.org, bgoodr@gmail.com Original-Received: via spool by 23795-done@debbugs.gnu.org id=D23795.146626674731032 (code D ref 23795); Sat, 18 Jun 2016 16:20:02 +0000 Original-Received: (at 23795-done) by debbugs.gnu.org; 18 Jun 2016 16:19:07 +0000 Original-Received: from localhost ([127.0.0.1]:45315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEIxf-00084S-Eg for submit@debbugs.gnu.org; Sat, 18 Jun 2016 12:19:07 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.10]:49446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEIxd-00084K-D0 for 23795-done@debbugs.gnu.org; Sat, 18 Jun 2016 12:19:05 -0400 Original-Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3rX2PN2xb7z3hjpP; Sat, 18 Jun 2016 18:19:04 +0200 (CEST) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3rX2PN2F8Gzvh25; Sat, 18 Jun 2016 18:19:04 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id voZBb8_eRfFt; Sat, 18 Jun 2016 18:19:03 +0200 (CEST) X-Auth-Info: 20chZDgntJMxEHYzTZmCUJa8mywBoauPxDRDMFZYzwdcvIYLylAx7b/G+6typw06 Original-Received: from igel.home (ppp-88-217-21-96.dynamic.mnet-online.de [88.217.21.96]) by mail.mnet-online.de (Postfix) with ESMTPA; Sat, 18 Jun 2016 18:19:03 +0200 (CEST) Original-Received: by igel.home (Postfix, from userid 1000) id 0F45D2C307F; Sat, 18 Jun 2016 18:19:03 +0200 (CEST) X-Yow: PARDON me, am I speaking ENGLISH? In-Reply-To: <22373.28050.673856.847792@gargle.gargle.HOWL> (bgoodr@gmail.com's message of "Sat, 18 Jun 2016 08:49:38 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:119734 Archived-At: bgoodr@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@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."