unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23795: 24.5; rx eval on variable gives symbol error
@ 2016-06-18 15:49 bgoodr
  2016-06-18 16:13 ` Noam Postavsky
  2016-06-18 16:19 ` Andreas Schwab
  0 siblings, 2 replies; 5+ messages in thread
From: bgoodr @ 2016-06-18 15:49 UTC (permalink / raw)
  To: 23795


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

Move point somewhere inside that expression and type C-M-x which is
bound to (eval-defun EDEBUG-IT). Get the error:

Debugger entered--Lisp error: (void-variable page-name)
  eval(page-name)
  rx-eval((eval page-name))
  rx-form((eval page-name) :)
  #[(x) "\301\b\302\"\207" [x rx-form :] 3]((eval page-name))
  mapconcat(#[(x) "\301\b\302\"\207" [x rx-form :] 3] ("[[" (eval page-name) "]]") nil)
  rx-and((and "[[" (eval page-name) "]]"))
  rx-form((and "[[" (eval page-name) "]]"))
  rx-to-string((and "[[" (eval page-name) "]]") t)
  #[(&rest regexps) "\b\204\b\0\301\302!\207\bA\203\x14\0\303\304\bB\305\"\207\303\b@\305\"\207" [regexps error "No regexp" rx-to-string and t] 3 ("/usr/share/emacs/24.5/lisp/emacs-lisp/rx.elc" . 19349)]("[[" (eval page-name) "]]")
  macroexpand((rx "[[" (eval page-name) "]]") nil)
  macroexp--expand-all((rx "[[" (eval page-name) "]]"))
  macroexp--all-forms((regexp (rx "[[" (eval page-name) "]]")) 1)
  macroexp--all-clauses(((regexp (rx "[[" (eval page-name) "]]"))) 1)
  #[1028 "\300\x01\300\301\x05\302\"\303\x06\a!\x06\b\242A#\x06\x06\242#\207" [macroexp--cons macroexp--all-clauses 1 macroexp--all-forms] 10 "\n\n(fn FORM BODY BINDINGS FUN)"](((let ((regexp (rx "[[" (eval page-name) "]]"))) regexp)) (regexp) ((regexp (rx "[[" (eval page-name) "]]"))) let)
  macroexp--expand-all((let ((regexp (rx "[[" (eval page-name) "]]"))) regexp))
  macroexp--all-forms(((let ((regexp (rx "[[" (eval page-name) "]]"))) regexp)))
  #[1028 "\300\x01\300\301\x05\302\"\303\x06\a!\x06\b\242A#\x06\x06\242#\207" [macroexp--cons macroexp--all-clauses 1 macroexp--all-forms] 10 "\n\n(fn FORM BODY BINDINGS FUN)"](((let ((page-name "the page")) (let ((regexp (rx "[[" (eval page-name) "]]"))) regexp))) ((let ((regexp (rx "[[" (eval page-name) "]]"))) regexp)) ((page-name "the page")) let)
  macroexp--expand-all((let ((page-name "the page")) (let ((regexp (rx "[[" (eval page-name) "]]"))) regexp)))
  macroexpand-all((let ((page-name "the page")) (let ((regexp (rx "[[" (eval page-name) "]]"))) regexp)))
  eval-sexp-add-defvars((let ((page-name "the page")) (let ((regexp (rx "[[" (eval page-name) "]]"))) regexp)))
  eval-defun-2()
  eval-defun(nil)
  call-interactively(eval-defun nil nil)
  command-execute(eval-defun)

But if you evaluate that buffer using M-x eval-buffer you get:

Eager macro-expansion failure: (void-variable page-name)

Regards,
-Brent





In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-04-17 on lgw01-04, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11803000
System Description:	Ubuntu 16.04 LTS

Configured using:
 `configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
 -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  diff-auto-refine-mode: t
  auto-insert-mode: t
  erc-services-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  shell-dirtrack-mode: t
  delete-selection-mode: t
  iswitchb-mode: t
  display-time-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: 1
  transient-mark-mode: t
  abbrev-mode: t

Recent messages:
Note: file is write protected
Fill column set to 80 (was 70)
File "/usr/share/emacs/24.5/lisp/emacs-lisp/pp.el.gz" is owned by root.
You can edit and save it which will automatically perform file permissions changes.
Quit [2 times]
Searched 1 buffer; 2152 matches for `...'
Renamed transient buffer "*Occur*" to "*Occur*<10>"
Searched 1 buffer; 2 matches for `\.\.\.'
Renamed transient buffer "*Occur*" to "*Occur*<11>"
Mark set [2 times]

Load-path shadows:
/home/brentg/install/Ubuntu.16.04.x86_64/share/emacs/site-lisp/autotest-mode hides /usr/share/emacs/site-lisp/autoconf/autotest-mode
/usr/share/emacs/24.5/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/home/brentg/emacs_lisp_imported/slime/tree-widget hides /usr/share/emacs/24.5/lisp/tree-widget
/home/brentg/emacs_lisp_imported/remember/remember hides /usr/share/emacs/24.5/lisp/textmodes/remember
/home/brentg/emacs_lisp_imported/css-mode/css-mode hides /usr/share/emacs/24.5/lisp/textmodes/css-mode
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-emacs-lisp hides /usr/share/emacs/24.5/lisp/org/ob-emacs-lisp
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-gnuplot hides /usr/share/emacs/24.5/lisp/org/ob-gnuplot
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-eval hides /usr/share/emacs/24.5/lisp/org/ob-eval
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-version hides /usr/share/emacs/24.5/lisp/org/org-version
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-compat hides /usr/share/emacs/24.5/lisp/org/org-compat
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ox-icalendar hides /usr/share/emacs/24.5/lisp/org/ox-icalendar
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-haskell hides /usr/share/emacs/24.5/lisp/org/ob-haskell
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ox-beamer hides /usr/share/emacs/24.5/lisp/org/ox-beamer
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-clojure hides /usr/share/emacs/24.5/lisp/org/ob-clojure
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-asymptote hides /usr/share/emacs/24.5/lisp/org/ob-asymptote
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ox-latex hides /usr/share/emacs/24.5/lisp/org/ox-latex
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-dot hides /usr/share/emacs/24.5/lisp/org/ob-dot
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-datetree hides /usr/share/emacs/24.5/lisp/org/org-datetree
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-ocaml hides /usr/share/emacs/24.5/lisp/org/ob-ocaml
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-colview hides /usr/share/emacs/24.5/lisp/org/org-colview
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-capture hides /usr/share/emacs/24.5/lisp/org/org-capture
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-footnote hides /usr/share/emacs/24.5/lisp/org/org-footnote
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-C hides /usr/share/emacs/24.5/lisp/org/ob-C
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-macs hides /usr/share/emacs/24.5/lisp/org/org-macs
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-fortran hides /usr/share/emacs/24.5/lisp/org/ob-fortran
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-ref hides /usr/share/emacs/24.5/lisp/org/ob-ref
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-calc hides /usr/share/emacs/24.5/lisp/org/ob-calc
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-mhe hides /usr/share/emacs/24.5/lisp/org/org-mhe
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-lisp hides /usr/share/emacs/24.5/lisp/org/ob-lisp
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ox-html hides /usr/share/emacs/24.5/lisp/org/ox-html
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-java hides /usr/share/emacs/24.5/lisp/org/ob-java
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-clock hides /usr/share/emacs/24.5/lisp/org/org-clock
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org hides /usr/share/emacs/24.5/lisp/org/org
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-id hides /usr/share/emacs/24.5/lisp/org/org-id
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-attach hides /usr/share/emacs/24.5/lisp/org/org-attach
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-rmail hides /usr/share/emacs/24.5/lisp/org/org-rmail
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-keys hides /usr/share/emacs/24.5/lisp/org/ob-keys
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-R hides /usr/share/emacs/24.5/lisp/org/ob-R
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-loaddefs hides /usr/share/emacs/24.5/lisp/org/org-loaddefs
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ox-publish hides /usr/share/emacs/24.5/lisp/org/ox-publish
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-css hides /usr/share/emacs/24.5/lisp/org/ob-css
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ox hides /usr/share/emacs/24.5/lisp/org/ox
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-src hides /usr/share/emacs/24.5/lisp/org/org-src
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-python hides /usr/share/emacs/24.5/lisp/org/ob-python
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-maxima hides /usr/share/emacs/24.5/lisp/org/ob-maxima
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-makefile hides /usr/share/emacs/24.5/lisp/org/ob-makefile
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-scala hides /usr/share/emacs/24.5/lisp/org/ob-scala
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-archive hides /usr/share/emacs/24.5/lisp/org/org-archive
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-inlinetask hides /usr/share/emacs/24.5/lisp/org/org-inlinetask
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-bbdb hides /usr/share/emacs/24.5/lisp/org/org-bbdb
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-entities hides /usr/share/emacs/24.5/lisp/org/org-entities
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ox-odt hides /usr/share/emacs/24.5/lisp/org/ox-odt
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-macro hides /usr/share/emacs/24.5/lisp/org/org-macro
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-gnus hides /usr/share/emacs/24.5/lisp/org/org-gnus
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-awk hides /usr/share/emacs/24.5/lisp/org/ob-awk
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-js hides /usr/share/emacs/24.5/lisp/org/ob-js
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-scheme hides /usr/share/emacs/24.5/lisp/org/ob-scheme
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-lob hides /usr/share/emacs/24.5/lisp/org/ob-lob
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-plantuml hides /usr/share/emacs/24.5/lisp/org/ob-plantuml
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-matlab hides /usr/share/emacs/24.5/lisp/org/ob-matlab
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-pcomplete hides /usr/share/emacs/24.5/lisp/org/org-pcomplete
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-info hides /usr/share/emacs/24.5/lisp/org/org-info
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-screen hides /usr/share/emacs/24.5/lisp/org/ob-screen
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-list hides /usr/share/emacs/24.5/lisp/org/org-list
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-ditaa hides /usr/share/emacs/24.5/lisp/org/ob-ditaa
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-docview hides /usr/share/emacs/24.5/lisp/org/org-docview
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-tangle hides /usr/share/emacs/24.5/lisp/org/ob-tangle
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-latex hides /usr/share/emacs/24.5/lisp/org/ob-latex
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-indent hides /usr/share/emacs/24.5/lisp/org/org-indent
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-table hides /usr/share/emacs/24.5/lisp/org/ob-table
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ox-man hides /usr/share/emacs/24.5/lisp/org/ox-man
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-mobile hides /usr/share/emacs/24.5/lisp/org/org-mobile
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ox-md hides /usr/share/emacs/24.5/lisp/org/ox-md
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-core hides /usr/share/emacs/24.5/lisp/org/ob-core
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-eshell hides /usr/share/emacs/24.5/lisp/org/org-eshell
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-feed hides /usr/share/emacs/24.5/lisp/org/org-feed
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-io hides /usr/share/emacs/24.5/lisp/org/ob-io
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-w3m hides /usr/share/emacs/24.5/lisp/org/org-w3m
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-ledger hides /usr/share/emacs/24.5/lisp/org/ob-ledger
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-sql hides /usr/share/emacs/24.5/lisp/org/ob-sql
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-exp hides /usr/share/emacs/24.5/lisp/org/ob-exp
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-table hides /usr/share/emacs/24.5/lisp/org/org-table
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-lilypond hides /usr/share/emacs/24.5/lisp/org/ob-lilypond
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-picolisp hides /usr/share/emacs/24.5/lisp/org/ob-picolisp
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-perl hides /usr/share/emacs/24.5/lisp/org/ob-perl
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-crypt hides /usr/share/emacs/24.5/lisp/org/org-crypt
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-protocol hides /usr/share/emacs/24.5/lisp/org/org-protocol
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-mouse hides /usr/share/emacs/24.5/lisp/org/org-mouse
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-agenda hides /usr/share/emacs/24.5/lisp/org/org-agenda
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-install hides /usr/share/emacs/24.5/lisp/org/org-install
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-sass hides /usr/share/emacs/24.5/lisp/org/ob-sass
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-comint hides /usr/share/emacs/24.5/lisp/org/ob-comint
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-mscgen hides /usr/share/emacs/24.5/lisp/org/ob-mscgen
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ox-ascii hides /usr/share/emacs/24.5/lisp/org/ox-ascii
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ox-texinfo hides /usr/share/emacs/24.5/lisp/org/ox-texinfo
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-org hides /usr/share/emacs/24.5/lisp/org/ob-org
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-faces hides /usr/share/emacs/24.5/lisp/org/org-faces
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-octave hides /usr/share/emacs/24.5/lisp/org/ob-octave
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-ruby hides /usr/share/emacs/24.5/lisp/org/ob-ruby
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-shen hides /usr/share/emacs/24.5/lisp/org/ob-shen
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob-sqlite hides /usr/share/emacs/24.5/lisp/org/ob-sqlite
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-element hides /usr/share/emacs/24.5/lisp/org/org-element
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ox-org hides /usr/share/emacs/24.5/lisp/org/ox-org
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-bibtex hides /usr/share/emacs/24.5/lisp/org/org-bibtex
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-timer hides /usr/share/emacs/24.5/lisp/org/org-timer
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-habit hides /usr/share/emacs/24.5/lisp/org/org-habit
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-ctags hides /usr/share/emacs/24.5/lisp/org/org-ctags
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/ob hides /usr/share/emacs/24.5/lisp/org/ob
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-plot hides /usr/share/emacs/24.5/lisp/org/org-plot
/home/brentg/emacs_lisp_imported/org-mode/org-mode/lisp/org-irc hides /usr/share/emacs/24.5/lisp/org/org-irc

Features:
(etags shadow mailalias bbdb-vm vm-autoload bbdb-snarf mail-extr
bbdb-com vm-rfaddons vm-message vm-macro emacsbug debug dabbrev
misearch multi-isearch log-view ediff-vers mule-util eieio-opt
speedbar sb-image ezimage dframe diff-mode vc-git org-rmail org-mhe
org-irc org-info org-gnus org-docview org-bibtex bibtex org-bbdb
org-w3m bg-emacs bg-customizations bg-kmacro-setup bg-match-util
bg-x-setup bg-ebrowse-setup ebrowse ebuff-menu bg-init-program-setup
bg-dos-batch-mode bg-cmake-setup cmake-mode bg-quack-setup
bg-qmake-setup bg-allout-setup bg-gimp-mode-setup eldoc cmuscheme
scheme gimp-mode scheme-complete snippet autoinsert bg-edebug-setup
edebug bg-instrument-util bg-regr-test-util bg-org-mode-setup ox-latex
ox-icalendar ox-html table ox-ascii ox-publish ox ob-shellint
ob-plantuml ob-dot ob-sqlite ob-sh ob-python bg-plantuml-mode-setup
plantuml-mode org-clock org-id org-element avl-tree org org-macro
org-footnote org-pcomplete org-list org-faces org-entities org-version
ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src
ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs
gnus-sum nnoo gnus-group gnus-undo nnmail mail-source gnus-start
gnus-spec gnus-int gnus-range gnus-win
bg-convert-muse-to-org-mode-util bg-calc-mode-setup calc-ext calc
calc-loaddefs calc-macs bg-sudo-setup sudo bg-crontab-util bg-reminder
bg-wikipedia-mode-setup wikipedia-mode bg-outline-magic-mode-setup
outline-magic noutline outline bg-emacs-lisp-mode-setup bg-lisp-util
find-func bg-lisp-setup bg-stumpwm-setup bg-css-mode-setup
bg-emacs-server-setup server bg-compressed-files-setup
bg-apropos-mode-setup apropos bg-search-tcl bg-man-setup man
bg-visual-basic-mode-setup bg-json-setup bg-help-mode-setup help-mode
bg-diag bg-password-hiding-setup bg-browser-setup bg-x-windows-util
bg-perl-setup gud bg-perl-util bg-rectangle-setup
bg-picture-mode-setup bg-xml-setup rng-nxml rng-valid rng-loc rng-uri
rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok
bg-boxquote-setup boxquote bg-iswitchb-setup bg-outline-setup
bg-autosave-setup bg-mgc-specific-gdb-utils bg-mail-abbrev-setup
ibuffer bg-planner-pmwiki-util bg-planner-setup bg-progressive-search
bg-progressive-search-man bg-progressive-search-file
bg-progressive-search-info bg-web-util mm-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util url-parse url-vars mailcap bg-progressive-search-w3m
bg-w3m-util bg-search-object-regexp-instruction-list
bg-search-object-simple bg-search-object-none
bg-progressive-search-base bg-search-object-base bg-planner-elisp
bg-remember-mode-setup remember-planner remember bg-bbdb-setup
bbdb-autoloads bbdb bg-planner-note-util bg-elisp-unit-test-util
bg-planner-util bg-muse-hacks image-file planner-lisp planner-publish
muse-xml planner cal-menu calendar cal-loaddefs sort muse-colors
bg-muse-setup bg-planner-abbrevs-setup muse-html muse-xml-common
cus-edit cus-start cus-load muse-publish muse-project muse-protocols
muse-regexps muse muse-nested-tags muse-mode
bg-cleanup-whitespace-at-point bg-planner-vars timeclock
bg-scrolling-setup bg-irc-setup erc-services erc-dcc erc-list erc-menu
erc-join erc-ring erc-networks erc-pcomplete erc-track erc-match
erc-button erc-fill erc-stamp erc-netsplit erc-goodies erc erc-backend
erc-compat bg-ediff-setup bg-info-setup bg-completion-list-mode-setup
bg-global-key-mappings bg-jira-interface bg-wrap-variable-util
bg-rx-interactive bg-grep-setup bg-grep-group grep
bg-color-moccur-setup color-moccur bg-search-replace-util
bg-occur-mode-setup bg-find-file-setup bg-bookmark-definitions
bookmark pp bg-tabstop-definitions bg-mail-setup vm-w3m vm-pine
vm-mark vm-save vm-virtual vm-summary-faces vm-edit vm-imap vm-pop
vm-delete vm-digest vm-reply vm-toolbar vm-sort vm-undo vm-page
vm-motion vm-thread vm-mouse vm-minibuf vm-mime vm-menu tapestry
vm-window vm-crypto vm-summary vm-folder vm-misc vm vm-autoloads
vm-version vm-vars bg-encryption-setup epa-file epa derived epg
epg-config supercite regi smtpmail sendmail bg-gnus-definitions imap
gnus gnus-ems nnheader bg-pmwiki-mode-setup bg-w3m-setup edmacro
kmacro w3m browse-url doc-view jka-compr image-mode timezone w3m-hist
w3m-fb bookmark-w3m w3m-ems wid-edit w3m-ccl ccl w3m-favicon w3m-image
w3m-proc w3m-util bg-octave-setup bg-scm-setup bg-vc-util vc pcvs
vc-cvs pcvs-parse pcvs-info pcvs-defs bg-git-setup git log-edit
easy-mmode message rfc822 mml mml-sec mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils
gmm-utils mailheader pcvs-util add-log ewoc bg-tcl-mode-setup
bg-compile-setup bg-grep-compilation-util bg-python-mode-setup python
bg-buffer-menu-setup bg-makefile-mode-setup bg-shell-script-mode-setup
sh-script smie executable bg-dbx bg-gdb bg-gdb-util
bg-javascript-setup js json imenu bg-java-setup bg-minibuffer-setup
bg-frame-definitions bg-vc-mode-setup vc-dispatcher
bg-dired-extensions bg-pdf-setup bg-pdf-util dired-aux dired
bg-forms-mode-setup forms-mode forms bg-tramp-setup tramp tramp-compat
auth-source eieio byte-opt bytecomp byte-compile cl-extra cconv
eieio-core gnus-util mm-util mail-prsvr password-cache tramp-loaddefs
trampver format-spec bg-isearch-setup bg-display-setup
bg-cc-mode-setup bg-debug-util bg-narrowing-setup bg-cxx-nav
bg-run-immediate bg-window-config-helper bg-id-utils-setup idutils
thingatpt compile bg-env-setup info bg-info-util bg-symbol-stack
bg-cxx-util bg-cxx-scan-debug-mode-base bg-basic-regexps-and-chars
bg-p4-setup advice bg-p4-completion bg-p4-resolve bg-set-util
bg-ediff-sparse-mode bg-ediff-sparse-mode-base bg-p4-manual-apply-mode
bg-p4-manual-apply-mode-base bg-error-nav-util bg-mgc-specific-setup
bg-local-directory-registry-util bg-rx-extra bg-shell-mode-setup
bg-shell-util skeleton bg-abbrev-skeleton-util bg-background
bg-rlogin-setup rlogin shell pcomplete comint ansi-color ring
bg-open-at-point bg-p4-scan-mode bg-p4-scan-mode-base view
bg-button-mode-util bg-p4-basic-button bg-p4-util cc-mode cc-fonts
easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs bg-pushfile-util bg-unit-test-util bg-text-mode-setup
bg-elisp-debug-util elp perl-mode rect bg-delete-selection-mode-setup
delsel bg-utility allout iswitchb bg-file-cleanup bg-os-util
bg-win32-utility help-fns cl-macs rx bg-win32-paths bg-linux-utility
help-macro ediff-merg ediff-wind ediff-diff ediff-mult ediff-help
ediff-init ediff-util ediff bg-coding-system-setup time bg-basic-setup
bg-emacs-config cl gv cl-loaddefs cl-lib lisppaste-autoloads
xml-rpc-autoloads package reporter time-date tooltip electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 1277310 144169)
 (symbols 48 75504 0)
 (miscs 40 3064 1972)
 (strings 32 183608 27688)
 (string-bytes 1 8104074)
 (vectors 16 57038)
 (vector-slots 8 1680207 203943)
 (floats 8 737 1316)
 (intervals 56 60478 5212)
 (buffers 960 207)
 (heap 1024 103826 2483))

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#23795: 24.5; rx eval on variable gives symbol error
  2016-06-18 15:49 bug#23795: 24.5; rx eval on variable gives symbol error bgoodr
@ 2016-06-18 16:13 ` Noam Postavsky
  2016-06-18 16:15   ` Brent Goodrick
  2016-06-18 16:19 ` Andreas Schwab
  1 sibling, 1 reply; 5+ messages in thread
From: Noam Postavsky @ 2016-06-18 16:13 UTC (permalink / raw)
  To: bgoodr; +Cc: 23795

rx is a macro so it doesn't see runtime bindings, using
let-when-compile (new in Emacs 25) works:

(let-when-compile ((page-name "the page"))
  (rx "[[" (eval page-name) "]]"))

Not sure if the plain let case can/should be fixed.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#23795: 24.5; rx eval on variable gives symbol error
  2016-06-18 16:13 ` Noam Postavsky
@ 2016-06-18 16:15   ` Brent Goodrick
  0 siblings, 0 replies; 5+ messages in thread
From: Brent Goodrick @ 2016-06-18 16:15 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 23795

[-- Attachment #1: Type: text/plain, Size: 392 bytes --]

Ok thanks Noam. Then I conclude this isn't a bug per se.

On Sat, Jun 18, 2016 at 9:13 AM, Noam Postavsky <
npostavs@users.sourceforge.net> wrote:

> rx is a macro so it doesn't see runtime bindings, using
> let-when-compile (new in Emacs 25) works:
>
> (let-when-compile ((page-name "the page"))
>   (rx "[[" (eval page-name) "]]"))
>
> Not sure if the plain let case can/should be fixed.
>

[-- Attachment #2: Type: text/html, Size: 760 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#23795: 24.5; rx eval on variable gives symbol error
  2016-06-18 15:49 bug#23795: 24.5; rx eval on variable gives symbol error bgoodr
  2016-06-18 16:13 ` Noam Postavsky
@ 2016-06-18 16:19 ` Andreas Schwab
  2016-06-18 16:21   ` Brent Goodrick
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2016-06-18 16:19 UTC (permalink / raw)
  To: bgoodr; +Cc: 23795-done

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#23795: 24.5; rx eval on variable gives symbol error
  2016-06-18 16:19 ` Andreas Schwab
@ 2016-06-18 16:21   ` Brent Goodrick
  0 siblings, 0 replies; 5+ messages in thread
From: Brent Goodrick @ 2016-06-18 16:21 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 23795-done

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

Understood. Thanks Andreas.

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

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

[-- Attachment #2: Type: text/html, Size: 1365 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-18 16:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-18 15:49 bug#23795: 24.5; rx eval on variable gives symbol error bgoodr
2016-06-18 16:13 ` Noam Postavsky
2016-06-18 16:15   ` Brent Goodrick
2016-06-18 16:19 ` Andreas Schwab
2016-06-18 16:21   ` Brent Goodrick

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).