From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 25 15:36:51 2013 Received: (at submit) by debbugs.gnu.org; 25 Feb 2013 20:36:51 +0000 Received: from localhost ([127.0.0.1]:50031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UA4n4-0002mv-KM for submit@debbugs.gnu.org; Mon, 25 Feb 2013 15:36:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44198) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UA4n1-0002mk-HU for submit@debbugs.gnu.org; Mon, 25 Feb 2013 15:36:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UA3l7-0006CE-Li for submit@debbugs.gnu.org; Mon, 25 Feb 2013 14:30:50 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:51010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA3l7-0006C5-CE for submit@debbugs.gnu.org; Mon, 25 Feb 2013 14:30:45 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA3l0-0005WZ-6G for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 14:30:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UA3kw-000691-EN for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 14:30:38 -0500 Received: from istinn.electusmatari.com ([83.169.37.145]:52071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UA3kw-00068b-5y for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 14:30:34 -0500 Received: from orion.kollektiv-hamburg.de (hmbg-4d06b82d.pool.mediaWays.net [77.6.184.45]) by istinn.electusmatari.com (Postfix) with ESMTPSA id 17421D10001E for ; Mon, 25 Feb 2013 20:30:32 +0100 (CET) Received: by orion.kollektiv-hamburg.de (Postfix, from userid 1000) id 2F22632CAD6; Mon, 25 Feb 2013 20:30:30 +0100 (CET) From: Jorgen Schaefer To: bug-gnu-emacs@gnu.org Subject: 24.3.50; Dynamic variables shadowing prevent defvar Date: Mon, 25 Feb 2013 20:30:29 +0100 Message-ID: <87hal0199m.fsf@orion.kollektiv-hamburg.de> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) 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.9 (------) When a file is autoloaded, defvar will fail to define locally-set, dynamic variabls, resulting in such variables not being defined at all, even after their local binding ends. Situation: (let ((some-var-that-influences-behavior t)) (some-function-that-autoloads-a-library)) If the library which is autoloaded by `some-function-that-autoloads-a-library' defines `some-var-that-influences-behavior' using defvar or defcustom, the variable is never bound globally because defvar thinks it's already defined. I would expect defvar to notice that the variable is bound only locally/temporarily and define a global binding anyhow. Reproduction: Put this file, bug-lib.el, somewhere in `load-path': -----8<----- bug-lib.el -----8<----- (defvar bug-variable t "This variable is not defined when autoloaded.") (defun bug-variable-value () bug-variable) ----->8----- ---------- ----->8----- Then execute the following lines: (autoload 'bug-variable-value "bug-lib.el") (let ((bug-variable nil)) (bug-variable-value)) => nil (bug-variable-value) => Error, `bug-variable' is not defined. Regards, -- Jorgen In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu) Bzr revision: 111608 schwab@linux-m68k.org-20130126151309-wk3nb8t4xitw94lh Configured using: `configure --without-x --with-x-toolkit=no' From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 25 18:17:05 2013 Received: (at 13814) by debbugs.gnu.org; 25 Feb 2013 23:17:05 +0000 Received: from localhost ([127.0.0.1]:50149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UA7I9-0006cJ-Ju for submit@debbugs.gnu.org; Mon, 25 Feb 2013 18:17:05 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:44220) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UA7I7-0006cC-JT for 13814@debbugs.gnu.org; Mon, 25 Feb 2013 18:17:04 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1UA7GS-0005yT-Hf; Mon, 25 Feb 2013 18:15:20 -0500 From: Glenn Morris To: Jorgen Schaefer Subject: Re: bug#13814: 24.3.50; Dynamic variables shadowing prevent defvar References: <87hal0199m.fsf@orion.kollektiv-hamburg.de> X-Spook: morse MP5K-SD quiche offensive information warfare LLNL X-Ran: NnsE:4=>Xw^kHEt;ZKa*c|vdWYm%2.|IR&e0NJItl8tqe.H:M0P]MD8whaKeStKvO,E}ph X-Hue: red X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 25 Feb 2013 18:15:20 -0500 In-Reply-To: <87hal0199m.fsf@orion.kollektiv-hamburg.de> (Jorgen Schaefer's message of "Mon, 25 Feb 2013 20:30:29 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.9 (----) X-Debbugs-Envelope-To: 13814 Cc: 13814@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: -7.6 (-------) Yes, it's a long-standing problem. Eg http://lists.gnu.org/archive/html/emacs-devel/2004-07/msg00589.html From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 25 19:04:50 2013 Received: (at 13814) by debbugs.gnu.org; 26 Feb 2013 00:04:51 +0000 Received: from localhost ([127.0.0.1]:50175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UA82M-0007m0-JB for submit@debbugs.gnu.org; Mon, 25 Feb 2013 19:04:50 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:40377) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UA82K-0007lt-Jd for 13814@debbugs.gnu.org; Mon, 25 Feb 2013 19:04:49 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFHO+KLv/2dsb2JhbABEuzWDWRdzgh8BBVYjEAsOJhIUGA0kiCTBLZEKA4hhnBmBXoMV X-IPAS-Result: Av8EABK/CFHO+KLv/2dsb2JhbABEuzWDWRdzgh8BBVYjEAsOJhIUGA0kiCTBLZEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="2448232" 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 19:03:04 -0500 Received: by pastel.home (Postfix, from userid 20848) id 8EE1F6C0A9; Mon, 25 Feb 2013 19:03:05 -0500 (EST) From: Stefan Monnier To: Jorgen Schaefer Subject: Re: bug#13814: 24.3.50; Dynamic variables shadowing prevent defvar Message-ID: References: <87hal0199m.fsf@orion.kollektiv-hamburg.de> Date: Mon, 25 Feb 2013 19:03:05 -0500 In-Reply-To: <87hal0199m.fsf@orion.kollektiv-hamburg.de> (Jorgen Schaefer's message of "Mon, 25 Feb 2013 20:30:29 +0100") 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: -0.0 (/) X-Debbugs-Envelope-To: 13814 Cc: 13814@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 (-) Thanks for filing it, so we have a clear bug-number for this long standing problem. If someone wants to take a crack at fixing it, I think that we should add a `set-toplevel-default' which defvar and defcustom could use, as for how to implement it, I you can take a look at the check&warning in the C code of `defvar'. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 15 22:43:45 2017 Received: (at control) by debbugs.gnu.org; 16 Jul 2017 02:43:45 +0000 Received: from localhost ([127.0.0.1]:40908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWZX7-00027z-DS for submit@debbugs.gnu.org; Sat, 15 Jul 2017 22:43:45 -0400 Received: from mail-it0-f51.google.com ([209.85.214.51]:34449) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWZX5-00027m-06 for control@debbugs.gnu.org; Sat, 15 Jul 2017 22:43:43 -0400 Received: by mail-it0-f51.google.com with SMTP id v202so10838545itb.1 for ; Sat, 15 Jul 2017 19:43:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version; bh=Pu82KfAehyYeZhRI0wf5BdWTMDv/0tPIrPJK9j+jg0Q=; b=V/HcNbRqJZiQmikkYC3PrropLF9D3kici9JPOdjgKeLS3A+ezML9UxtkvnoAFCK/hg JYfugmbM2qZ6H+AdBlK/0Vo4WOoIPygHIZbeRpNnQDZEWHaJDLvjYP4CKSeg6dvMRv9d TJrIT8UXbtH25Eiz3Yz9iFyBga0XKIGKoSH90zv5RuR4byHhxbkpLQAqXcy/Yd8Ogvkq aDGcXIeb9mjPz8V2vTHQsfBpFeAD1yU1aVGlHGvx4dPEcTwuS0mt0GkDCe326X6M+XXJ 949YOVZZYUVRIR/xtjJe1XLsGtR2EnGsVi05XgMC9dpyoojw8mc/IRivwqQo8z6cfyOR Z6kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version; bh=Pu82KfAehyYeZhRI0wf5BdWTMDv/0tPIrPJK9j+jg0Q=; b=dPrGcXWHS9weMpPgSRRNXlxBfFT9VFdROt5SlbgiTUp98DbeKzRsMxprYjsOCsOnoB NRySBPgblFoQB42lXaRQENwQ4N2uv87J8fAqq0VLxIYEzU/cXREH9x1cQ2j6YG943n/h QfFUbCRV5BXvDP3Ruzbm/bkSzAl+569hzC47+Q7IXfx5gPcm/sVo7EnS1fgbVzSFjTRF c29rtT3NIVSbf1yR7f6V0dnwzRRifPKbx+7x2g/Yl7cbOyvjruJNtA8xR7zkOZBjOcpu LCnnewGmmm1/SouAXgNkqfZmMzmQj7invf3owrP7ZD66zdK3f0CvCT4faZg2gppQS8Pj KuQQ== X-Gm-Message-State: AIVw113y+4f5wNGYoOVRMRoUAR76tP4jir4asJLxLiVjkuK3c4PQs6Pm ZKKTo0kA3sVc5/S9 X-Received: by 10.36.51.208 with SMTP id k199mr225933itk.8.1500173017199; Sat, 15 Jul 2017 19:43:37 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id e80sm3735411ite.3.2017.07.15.19.43.36 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Jul 2017 19:43:36 -0700 (PDT) From: npostavs@users.sourceforge.net To: control@debbugs.gnu.org Subject: control message for bug #13814 Date: Sat, 15 Jul 2017 22:45:09 -0400 Message-ID: <87o9slcd6y.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) tags 13814 + confirmed quit From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 22 21:21:48 2021 Received: (at 13814) by debbugs.gnu.org; 23 Aug 2021 01:21:48 +0000 Received: from localhost ([127.0.0.1]:40077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHyel-0006W5-Uc for submit@debbugs.gnu.org; Sun, 22 Aug 2021 21:21:48 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHyeg-0006Vl-RH for 13814@debbugs.gnu.org; Sun, 22 Aug 2021 21:21:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=2srqWqdkWyKLYil/urY/krfqdAHdsDMt1XcwRzkGJ4E=; b=AAQGZDW+s5u1ghrsf71CTWw/G0 k5KBi7F3Uv8yjK+nVKzttoGoEGKiXbm4sWumbTkPrAkM/D+dqLE1wRGrsuJ1t99Sz2RTI4D/xsS4g tho9yYFpnt3+LWlLmZPS76+tS8z04PuUzzFJY+4rLFgxUXVB4x58d7DFa1chhVQVrV2w=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mHyeV-0005WC-5U; Mon, 23 Aug 2021 03:21:31 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#13814: 24.3.50; Dynamic variables shadowing prevent defvar References: <87hal0199m.fsf@orion.kollektiv-hamburg.de> Date: Mon, 23 Aug 2021 03:21:26 +0200 In-Reply-To: (Stefan Monnier's message of "Mon, 25 Feb 2013 19:03:05 -0500") Message-ID: <87y28tt0q1.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: > Thanks for filing it, so we have a clear bug-number for this long > standing problem. If someone wants to take a crack at fixing it, > I think that we should add a `set-toplevel-default' which defva [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 13814 Cc: 13814@debbugs.gnu.org, Jorgen Schaefer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Monnier writes: > Thanks for filing it, so we have a clear bug-number for this long > standing problem. If someone wants to take a crack at fixing it, > I think that we should add a `set-toplevel-default' which defvar and > defcustom could use, as for how to implement it, I you can take a look > at the check&warning in the C code of `defvar'. When running this from M-: now, I get the following backtrace: Debugger entered--Lisp error: (error "Defining as dynamic an already lexical var") (defvar bug-variable t "This variable is not defined when autoloaded.") eval-buffer(# nil "/tmp/bug-lib.el" nil t) ; Reading at buffer position 74 load-with-code-conversion("/tmp/bug-lib.el" "/tmp/bug-lib.el" nil t) (bug-variable-value) (let ((bug-variable nil)) (bug-variable-value)) eval((let ((bug-variable nil)) (bug-variable-value)) t) eval-expression((let ((bug-variable nil)) (bug-variable-value)) nil nil 127) funcall-interactively(eval-expression (let ((bug-variable nil)) (bug-variable-value)) nil nil 127) call-interactively(eval-expression nil nil) So this signals an error when doing the (let ((bug-variable nil)) (bug-variable-value)) from a lexical context. And... from a dynamic context, it seems like this works as it should now? That is, the defvar "punches through" the let binding and defines the variable properly. (Which I didn't know; last time I looked at this, it didn't work, but it's some years back.) Has this been fixed, or am I testing it wrong somehow? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 22 21:21:54 2021 Received: (at control) by debbugs.gnu.org; 23 Aug 2021 01:21:54 +0000 Received: from localhost ([127.0.0.1]:40080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHyes-0006WO-Cy for submit@debbugs.gnu.org; Sun, 22 Aug 2021 21:21:54 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHyen-0006Vw-Bb for control@debbugs.gnu.org; Sun, 22 Aug 2021 21:21:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nIctXJ5/EjEVu7N6wT8wxOsYNEOFbDpIV6k9ISP3qrs=; b=n9pFYkEnsUXu7s5eBUuVwpPtTr yXE5PpnxMFqu06RDpITkRsFNozlfen6QBaBJwrerjlh7/NexNXmqDl6oOlXVxxpd3EZVD6v9N41Yt HtLjCZMKfzQzgm8BRvbZ0kacD1RPZe4j1XlWJ5MzRb57Ph78XaP+sVHN46cysSwHbhu4=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mHyef-0005WN-Lb for control@debbugs.gnu.org; Mon, 23 Aug 2021 03:21:39 +0200 Date: Mon, 23 Aug 2021 03:21:35 +0200 Message-Id: <87wnodt0ps.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #13814 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 13814 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 13814 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 24 17:25:48 2021 Received: (at 13814) by debbugs.gnu.org; 24 Aug 2021 21:25:48 +0000 Received: from localhost ([127.0.0.1]:45330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIdvX-0001Fj-Uu for submit@debbugs.gnu.org; Tue, 24 Aug 2021 17:25:48 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:57092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIdvW-0001FU-4H for 13814@debbugs.gnu.org; Tue, 24 Aug 2021 17:25:47 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1E3F210020E; Tue, 24 Aug 2021 17:25:40 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 13C71100083; Tue, 24 Aug 2021 17:25:34 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1629840334; bh=Rf9Pu341Cqc1+v7XPU3C0IbW4AY8D/RHPvKzAXFN/Kg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=VXklNjsCQrXzexoXaDlRLcOtvw8aG9U5TFJ0v9ggLyfoWntmBgo97bzJNgRG6YUZi YDzq9F3x7hDPWe2efNEpOsivs7/0wBVtIPBtChOYUotMqXyKlqP5JYuz1uh/YYhmHz GF2kmu/zGC0ugDe3wtyblTOcxbNWVl0DMUzwZ9Axe5eJogkgCb6Da9k8y2Tl1saWKP kajcZ0oAaCiUMQcdpO36crIuq/Csn1Ee2HNihIbWeLV/7zURyTYKMJi58h5g5xfMRT QLtb5ZJ+JkVOeFpbYyGZ/WdlTKmE2l6c7sWgHKDMj8+RrP2zrMazs+6FRkVMbW0LlK 6oRAn4uCYYR8Q== Received: from alfajor (unknown [104.247.244.135]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BEB9D1200E2; Tue, 24 Aug 2021 17:25:33 -0400 (EDT) From: Stefan Monnier To: Lars Ingebrigtsen Subject: Re: bug#13814: 24.3.50; Dynamic variables shadowing prevent defvar Message-ID: References: <87hal0199m.fsf@orion.kollektiv-hamburg.de> <87y28tt0q1.fsf@gnus.org> Date: Tue, 24 Aug 2021 17:25:33 -0400 In-Reply-To: <87y28tt0q1.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 23 Aug 2021 03:21:26 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.079 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 13814 Cc: 13814@debbugs.gnu.org, Jorgen Schaefer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen [2021-08-23 03:21:26] wrote: > Stefan Monnier writes: >> Thanks for filing it, so we have a clear bug-number for this long >> standing problem. If someone wants to take a crack at fixing it, >> I think that we should add a `set-toplevel-default' which defvar and >> defcustom could use, as for how to implement it, I you can take a look >> at the check&warning in the C code of `defvar'. FWIW, this bug was presumably fixed with: commit a104f656c8217b027866d32e8d7bf024a671e3cc Author: Stefan Monnier Date: Fri Aug 2 17:16:33 2013 -0400 So we should probably close it. > When running this from M-: now, I get the following backtrace: > > Debugger entered--Lisp error: (error "Defining as dynamic an already lexical var") > (defvar bug-variable t "This variable is not defined when autoloaded.") > eval-buffer(# nil "/tmp/bug-lib.el" nil t) ; Reading at buffer position 74 > load-with-code-conversion("/tmp/bug-lib.el" "/tmp/bug-lib.el" nil t) > (bug-variable-value) > (let ((bug-variable nil)) (bug-variable-value)) > eval((let ((bug-variable nil)) (bug-variable-value)) t) > eval-expression((let ((bug-variable nil)) (bug-variable-value)) nil nil 127) > funcall-interactively(eval-expression (let ((bug-variable nil)) (bug-variable-value)) nil nil 127) > call-interactively(eval-expression nil nil) > > So this signals an error when doing the > > (let ((bug-variable nil)) > (bug-variable-value)) > > from a lexical context. Yes, this is a new feature: when we get to the `defvar` the problem is not just that we need to "punch through" and define the toplevel/dynamic value of `bug-variable` but also that the `let` would need to be retroactively changed to be dynamic, which would in general require time-travel, hence the error. The fix is to use another var name (if you do want your `let` to be statically scoped) or to use `dlet`, or an explicit `defvar`, or an explicit `(require 'bug-lib)`, ... Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 25 07:00:54 2021 Received: (at 13814) by debbugs.gnu.org; 25 Aug 2021 11:00:54 +0000 Received: from localhost ([127.0.0.1]:45887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIqeL-0004iO-Mh for submit@debbugs.gnu.org; Wed, 25 Aug 2021 07:00:54 -0400 Received: from quimby.gnus.org ([95.216.78.240]:35118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIqeH-0004a3-Pv for 13814@debbugs.gnu.org; Wed, 25 Aug 2021 07:00:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=i+UJzYK1ggxF274b3enRcCbwvVwk1XNsZ3uz78Ass0g=; b=k9eBLKV81MqScudGdEv7DW+XAM UA6uVlrRA0G0g5cuFfRm2xb2gHXlaAX0cBmphZfxDU6PlxKM8nJN+6qFeqM9K5/HPOp3KDq/VxaIa 66JQB1F1O9NEs5o76HubAmllAfrsJJcfHiZ96IdJ9lkOCDnQPYQmgQg1BMoXW1VTvI8Q=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIqe6-0003AG-AK; Wed, 25 Aug 2021 13:00:42 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#13814: 24.3.50; Dynamic variables shadowing prevent defvar References: <87hal0199m.fsf@orion.kollektiv-hamburg.de> <87y28tt0q1.fsf@gnus.org> Date: Wed, 25 Aug 2021 13:00:37 +0200 In-Reply-To: (Stefan Monnier's message of "Tue, 24 Aug 2021 17:25:33 -0400") Message-ID: <87wno9lrfu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: > FWIW, this bug was presumably fixed with: > > commit a104f656c8217b027866d32e8d7bf024a671e3cc > Author: Stefan Monnier > Date: Fri Aug 2 17:16:33 2013 -0400 > > So we shou [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 13814 Cc: 13814@debbugs.gnu.org, Jorgen Schaefer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Monnier writes: > FWIW, this bug was presumably fixed with: > > commit a104f656c8217b027866d32e8d7bf024a671e3cc > Author: Stefan Monnier > Date: Fri Aug 2 17:16:33 2013 -0400 > > So we should probably close it. Yup; closing it now. > Yes, this is a new feature: when we get to the `defvar` the problem is > not just that we need to "punch through" and define the toplevel/dynamic > value of `bug-variable` but also that the `let` would need to be > retroactively changed to be dynamic, which would in general require > time-travel, hence the error. That's being defeatist -- surely theory implies that time travel should be available any day now... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 25 07:00:59 2021 Received: (at control) by debbugs.gnu.org; 25 Aug 2021 11:00:59 +0000 Received: from localhost ([127.0.0.1]:45890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIqeR-0004nN-3v for submit@debbugs.gnu.org; Wed, 25 Aug 2021 07:00:59 -0400 Received: from quimby.gnus.org ([95.216.78.240]:35134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIqeP-0004gf-01 for control@debbugs.gnu.org; Wed, 25 Aug 2021 07:00:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=M3W7UMtk+I4V+dfWmap6ENFqjTdofsnlK2s/9TShpd8=; b=C8EcFSNejRLXuU+axYgpAD7Vxp bh6AYUIcD9uGO8Ub4VhbVHNEyxp1iKmcbEdS7bBCcL5VglOzaIyd1B8yh4g1+eoF1gki+HOTQW9jp 50qNlMhVY3qfnqLit76Cn2+VtWNmWbNOMBxTuyRhrE7nR5I5c+P8E7M89185h0QPRxyg=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mIqeG-0003AV-VZ for control@debbugs.gnu.org; Wed, 25 Aug 2021 13:00:51 +0200 Date: Wed, 25 Aug 2021 13:00:48 +0200 Message-Id: <87v93tlrfj.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #13814 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 13814 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 13814 quit From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 25 10:41:21 2021 Received: (at 13814) by debbugs.gnu.org; 25 Aug 2021 14:41:21 +0000 Received: from localhost ([127.0.0.1]:47287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIu5h-0005qG-LN for submit@debbugs.gnu.org; Wed, 25 Aug 2021 10:41:21 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:58103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIu5e-0005q0-K2 for 13814@debbugs.gnu.org; Wed, 25 Aug 2021 10:41:19 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id BA3E6809C6; Wed, 25 Aug 2021 10:41:12 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9C3018078F; Wed, 25 Aug 2021 10:41:10 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1629902470; bh=GiRTgZreURL0hcfEkjvZkC8bSZ7eD56aO4HaWyCqnGw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=d8HkyTD6O+Y9c9bcVgT3rJh4KvomYNM2JvvB/efh/KqVFsDsAdMRfpNhY/oWrSr7O LQFk9GlS5yX2UhCOOAnhQfhCtIsq+qUM8TaY1pyoRGYTYx2jy/KOqK7ugbVNy3xdPG sDRKAgwCuzm/jiY+IHzrdSOEEdXNpzQ55T+B2T0cle1f8y1L/wEqRZMCgDkSDldKI1 89KvrKW1Ju5myPEDlI/0X2QQxHi2sxN8wheLSSBj8sjMoLmfmHSuRfUsr+5sXHSW8L Rp2LK0NQOCYc3Pi/OrrXK1R/1B8YFPNFnIoUxbeg8VD0rjrlKtmuy5/GCubA1HkYKF QBTps8hjm3mDA== Received: from alfajor (unknown [104.247.244.135]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5312B12044C; Wed, 25 Aug 2021 10:41:10 -0400 (EDT) From: Stefan Monnier To: Lars Ingebrigtsen Subject: Re: bug#13814: 24.3.50; Dynamic variables shadowing prevent defvar Message-ID: References: <87hal0199m.fsf@orion.kollektiv-hamburg.de> <87y28tt0q1.fsf@gnus.org> <87wno9lrfu.fsf@gnus.org> Date: Wed, 25 Aug 2021 10:41:09 -0400 In-Reply-To: <87wno9lrfu.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 25 Aug 2021 13:00:37 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.070 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 13814 Cc: 13814@debbugs.gnu.org, Jorgen Schaefer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > That's being defeatist -- surely theory implies that time travel should > be available any day now... I heard it was available in early versions of Emacs, Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 25 12:03:45 2021 Received: (at 13814) by debbugs.gnu.org; 25 Aug 2021 16:03:45 +0000 Received: from localhost ([127.0.0.1]:47398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIvNR-0003mQ-6S for submit@debbugs.gnu.org; Wed, 25 Aug 2021 12:03:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIvNP-0003mC-5f for 13814@debbugs.gnu.org; Wed, 25 Aug 2021 12:03:44 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52210) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIvNI-0005E2-MA; Wed, 25 Aug 2021 12:03:36 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2766 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIvNI-0000GT-3Q; Wed, 25 Aug 2021 12:03:36 -0400 Date: Wed, 25 Aug 2021 19:03:31 +0300 Message-Id: <838s0pv7e4.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-Reply-To: (bug-gnu-emacs@gnu.org) Subject: Re: bug#13814: 24.3.50; Dynamic variables shadowing prevent defvar References: <87hal0199m.fsf@orion.kollektiv-hamburg.de> <87y28tt0q1.fsf@gnus.org> <87wno9lrfu.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 13814 Cc: 13814@debbugs.gnu.org, larsi@gnus.org, forcer@forcix.cx X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 13814@debbugs.gnu.org, Jorgen Schaefer > Date: Wed, 25 Aug 2021 10:41:09 -0400 > From: Stefan Monnier via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > > That's being defeatist -- surely theory implies that time travel should > > be available any day now... > > I heard it was available in early versions of Emacs, Emacs supports that since eons ago: see Antinews in the manual. From unknown Mon Jun 23 02:24:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 23 Sep 2021 11:24:05 +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