GNU bug report logs - #13811
[Leo Liu] Byte-compile lexical-scoped elisp

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Mon, 25 Feb 2013 15:10:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13811 in the body.
You can then email your comments to 13811 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to sdl.web <at> gmail.com, bug-gnu-emacs <at> gnu.org:
bug#13811; Package emacs. (Mon, 25 Feb 2013 15:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
New bug report received and forwarded. Copy sent to sdl.web <at> gmail.com, bug-gnu-emacs <at> gnu.org. (Mon, 25 Feb 2013 15:10:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: bug-gnu-emacs <at> gnu.org
Subject: [Leo Liu] Byte-compile lexical-scoped elisp
Date: Mon, 25 Feb 2013 10:07:56 -0500
[Message part 1 (text/plain, inline)]
Forwarding to get a bug-number.

[Message part 2 (message/rfc822, inline)]
From: Leo Liu <sdl.web <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Byte-compile lexical-scoped elisp
Date: Mon, 25 Feb 2013 20:43:53 +0800
Hello Stefan,

I got a bug report on ack.el (https://github.com/leoliu/ack-el/issues/1)
when running ack.el uncompiled.

The steps to reproduce:

1. wget https://github.com/leoliu/ack-el/raw/master/ack.el
2. Emacs -q -l ack.el
3. M-x ack

file-name-nondirectory: Symbol's value as variable is void: project-root

Could you help me understand what is wrong here? It seems when
uncompiled project-root is not treated as a special variable.

Thank you,
Leo

Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Mon, 25 Feb 2013 16:09:01 GMT) Full text and rfc822 format available.

Notification sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
bug acknowledged by developer. (Mon, 25 Feb 2013 16:09:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 13811-done <at> debbugs.gnu.org
Subject: Re: Byte-compile lexical-scoped elisp
Date: Mon, 25 Feb 2013 11:06:54 -0500
> The steps to reproduce:
> 1. wget https://github.com/leoliu/ack-el/raw/master/ack.el
> 2. Emacs -q -l ack.el
> 3. M-x ack
> file-name-nondirectory: Symbol's value as variable is void: project-root

Indeed, the problem is that the dynamic binding of project-root is
created inside the `interactive' spec and that spec is not run in the
proper lexical environment (it is run in lexical mode, but in an empty
lexical environment).

> Could you help me understand what is wrong here?

A bug in Emacs.  Should be fixed on the trunk now.

BTW, please add an "ack--" prefix to your `project-root' var: all
`defvar'd variables should have such a prefix.


        Stefan




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 26 Mar 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 31 days ago.

Previous Next


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