From unknown Sun Jun 22 20:57:14 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#13811 <13811@debbugs.gnu.org> To: bug#13811 <13811@debbugs.gnu.org> Subject: Status: [Leo Liu] Byte-compile lexical-scoped elisp Reply-To: bug#13811 <13811@debbugs.gnu.org> Date: Mon, 23 Jun 2025 03:57:14 +0000 retitle 13811 [Leo Liu] Byte-compile lexical-scoped elisp reassign 13811 emacs submitter 13811 Stefan Monnier severity 13811 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 25 10:09:47 2013 Received: (at submit) by debbugs.gnu.org; 25 Feb 2013 15:09:47 +0000 Received: from localhost ([127.0.0.1]:49733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9zgY-0002CJ-Ua for submit@debbugs.gnu.org; Mon, 25 Feb 2013 10:09:47 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52790) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9zgV-0002CB-RW for submit@debbugs.gnu.org; Mon, 25 Feb 2013 10:09:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9zes-0003QB-2b for submit@debbugs.gnu.org; Mon, 25 Feb 2013 10:08:03 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-102.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:58960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zer-0003Px-Td for submit@debbugs.gnu.org; Mon, 25 Feb 2013 10:08:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zeq-0000if-C0 for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 10:08:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9zen-0003O1-Lx for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 10:08:00 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:57396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zen-0003Nq-HX for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 10:07:57 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsoGABK/CFHO+KLv/2dsb2JhbABEtyKHbBdzgntyJhgNiEgMn3+hHgSNYYMpA4hhnBmBXoMV X-IPAS-Result: AsoGABK/CFHO+KLv/2dsb2JhbABEtyKHbBdzgntyJhgNiEgMn3+hHgSNYYMpA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="2400355" Received: from 206-248-162-239.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.239]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 25 Feb 2013 10:07:55 -0500 Received: by pastel.home (Postfix, from userid 20848) id 139D76BD7C; Mon, 25 Feb 2013 10:07:56 -0500 (EST) From: Stefan Monnier To: bug-gnu-emacs@gnu.org Subject: [Leo Liu] Byte-compile lexical-scoped elisp Message-ID: X-Debbugs-Cc: Leo Liu Date: Mon, 25 Feb 2013 10:07:56 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) --=-=-= Content-Type: text/plain Forwarding to get a bug-number. --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 8bit Return-Path: X-Original-To: monnier@iro.umontreal.ca Delivered-To: monnier@iro.umontreal.ca Received: from pinpin.iro.umontreal.ca (pinpin.iro.umontreal.ca [132.204.24.52]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 9361B84860 for ; Mon, 25 Feb 2013 07:44:26 -0500 (EST) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by pinpin.iro.umontreal.ca (Postfix) with ESMTP id AF6823B8E57 for ; Mon, 25 Feb 2013 07:44:00 -0500 (EST) Received: by mail-pa0-f52.google.com with SMTP id fb1so1729916pad.25 for ; Mon, 25 Feb 2013 04:44:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:date:message-id:mime-version :content-type; bh=jDRzCu+Gm8YQ6AbtQEJome4ehnws3YrB85rRdiu3UCc=; b=l/KOxgqoZg4N/IIoTJJqj2jOQnkqW25ZxLJNeEUF+F9WN4Pkl3LX7/D4bIFq4SZ443 1cSelMDrgDLggTXZVqWc0lYD2OYCupyp0+FxP6SZrbdGaTkw8UCtiJdsOe89PvG1BlpC HSd668sg5WgsQcASIjTlFnrC684FvoUBHTQCtJ7jKcj9reE0gtW8pbTRLeZI9u/SpN+H syxaTFBVHLNTJUj+vKzQdn/ubBOJcM8hRyridifc6wEeRIUkT/Qyjr0zm383V8CKNbFy av3guJDtPfZLmrGslqmPmp3ZeRYMSdruJcKrW8088WRNDNrwpoksUqxJXdUbDAD12V5U 9WMw== X-Received: by 10.66.19.229 with SMTP id i5mr18504871pae.220.1361796240091; Mon, 25 Feb 2013 04:44:00 -0800 (PST) Received: from Shidais-iMac.local ([119.255.41.66]) by mx.google.com with ESMTPS id kb3sm12652227pbc.21.2013.02.25.04.43.58 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 25 Feb 2013 04:43:59 -0800 (PST) From: Leo Liu To: Stefan Monnier Subject: Byte-compile lexical-scoped elisp Date: Mon, 25 Feb 2013 20:43:53 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-1.94, requis 5, BAYES_00 -2.60, MC_TSTLAST 0.00, RECEIVED_FROM_NOUNK 0.66, SPF_HELO_PASS -0.00) X-DIRO-MailScanner-From: sdl.web@gmail.com X-Spam-Status: No 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 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 25 11:08:39 2013 Received: (at 13811-done) by debbugs.gnu.org; 25 Feb 2013 16:08:39 +0000 Received: from localhost ([127.0.0.1]:49790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UA0bW-0003ps-IA for submit@debbugs.gnu.org; Mon, 25 Feb 2013 11:08:38 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:64673) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UA0bT-0003ph-Tn for 13811-done@debbugs.gnu.org; Mon, 25 Feb 2013 11:08:36 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KLv/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBgzBHQSRCgOIYZwZgV6DFQ X-IPAS-Result: Av4EABK/CFHO+KLv/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBgzBHQSRCgOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="2405624" Received: from 206-248-162-239.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.239]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 25 Feb 2013 11:06:54 -0500 Received: by pastel.home (Postfix, from userid 20848) id F383A6BD7C; Mon, 25 Feb 2013 11:06:54 -0500 (EST) From: Stefan Monnier To: Leo Liu Subject: Re: Byte-compile lexical-scoped elisp Message-ID: References: Date: Mon, 25 Feb 2013 11:06:54 -0500 In-Reply-To: (Stefan Monnier's message of "Mon, 25 Feb 2013 10:07:56 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 13811-done Cc: 13811-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > 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 From unknown Sun Jun 22 20:57:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 26 Mar 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator