From unknown Mon Aug 18 00:07:56 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#23463 <23463@debbugs.gnu.org> To: bug#23463 <23463@debbugs.gnu.org> Subject: Status: safe local variable properties no longer effective Reply-To: bug#23463 <23463@debbugs.gnu.org> Date: Mon, 18 Aug 2025 07:07:56 +0000 retitle 23463 safe local variable properties no longer effective reassign 23463 emacs submitter 23463 Glenn Morris severity 23463 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu May 05 18:00:16 2016 Received: (at submit) by debbugs.gnu.org; 5 May 2016 22:00:16 +0000 Received: from localhost ([127.0.0.1]:40865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayRJg-0002Qz-49 for submit@debbugs.gnu.org; Thu, 05 May 2016 18:00:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayRJe-0002JV-VM for submit@debbugs.gnu.org; Thu, 05 May 2016 18:00:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayRJQ-0007to-Df for submit@debbugs.gnu.org; Thu, 05 May 2016 18:00:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53546) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayRJQ-0007sY-Ah for submit@debbugs.gnu.org; Thu, 05 May 2016 18:00:00 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ayRJL-00023T-D4; Thu, 05 May 2016 17:59:55 -0400 From: Glenn Morris To: submit@debbugs.gnu.org Subject: safe local variable properties no longer effective X-Debbugs-CC: Alan Mackenzie X-Spook: Geraldton Riot Albania Storm Avian Kosovo Gazprom X-Ran: 2zh~jwcD~j\7:qH}r],iZAG9fo(kiVFdZn<{tMEN4Xa--e,&<9=Sq X-Hue: cyan X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 05 May 2016 17:59:55 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.1 (-------) X-Debbugs-Envelope-To: submit 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: -7.1 (-------) Package: emacs Version: 25.1.50 emacs -Q foo.py where foo.py has contents: # Local Variables: # python-indent-offset: 2 # End: Current emacs-25 branch: file opens fine with no prompting, python-indent-offset is set to 2. Current master: one is told that python-indent-offset is not safe Same applies to any similar major-mode-specific local variable. This is due to 25f455815bfaa868dc470d445413df9a7a546c46. From debbugs-submit-bounces@debbugs.gnu.org Thu May 05 18:02:03 2016 Received: (at control) by debbugs.gnu.org; 5 May 2016 22:02:03 +0000 Received: from localhost ([127.0.0.1]:40871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayRLP-0003qn-FL for submit@debbugs.gnu.org; Thu, 05 May 2016 18:02:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41167) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayRLO-0003mV-7u for control@debbugs.gnu.org; Thu, 05 May 2016 18:02:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayRLA-0008UO-4a for control@debbugs.gnu.org; Thu, 05 May 2016 18:01:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayRLA-0008TK-29 for control@debbugs.gnu.org; Thu, 05 May 2016 18:01:48 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ayRL5-00054T-Dd for control@debbugs.gnu.org; Thu, 05 May 2016 18:01:43 -0400 Subject: control message for bug 21966 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Thu, 05 May 2016 18:01:43 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.1 (-------) 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: -7.1 (-------) block 21966 by 23463 From debbugs-submit-bounces@debbugs.gnu.org Fri May 06 05:15:00 2016 Received: (at 23463) by debbugs.gnu.org; 6 May 2016 09:15:00 +0000 Received: from localhost ([127.0.0.1]:41128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aybqe-0007k5-3u for submit@debbugs.gnu.org; Fri, 06 May 2016 05:15:00 -0400 Received: from mail.muc.de ([193.149.48.3]:41767) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aybqb-0007jv-Mu for 23463@debbugs.gnu.org; Fri, 06 May 2016 05:14:58 -0400 Received: (qmail 66691 invoked by uid 3782); 6 May 2016 09:14:55 -0000 Received: from acm.muc.de (p548C6264.dip0.t-ipconnect.de [84.140.98.100]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 06 May 2016 11:14:54 +0200 Received: (qmail 4028 invoked by uid 1000); 6 May 2016 09:14:54 -0000 Date: Fri, 6 May 2016 09:14:54 +0000 To: Glenn Morris Subject: Re: bug#23463: safe local variable properties no longer effective Message-ID: <20160506091453.GA3898@acm.fritz.box> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 23463 Cc: 23463@debbugs.gnu.org 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: -2.1 (--) Hello, Glenn. On Thu, May 05, 2016 at 05:59:55PM -0400, Glenn Morris wrote: > Package: emacs > Version: 25.1.50 > emacs -Q foo.py > where foo.py has contents: > # Local Variables: > # python-indent-offset: 2 > # End: > Current emacs-25 branch: file opens fine with no prompting, > python-indent-offset is set to 2. > Current master: one is told that python-indent-offset is not safe Yes. What is happening is that the call to `fundamental-mode' at the beginning of `normal-mode' is itself calling `hack-local-variables' (via `run-mode-hooks'). This is wrong. At that stage, python-mode has not yet been loaded, so `hack-local-variables' doesn't know that `python-indent-offset' is "safe". > Same applies to any similar major-mode-specific local variable. > This is due to 25f455815bfaa868dc470d445413df9a7a546c46. Please try out the following, and let me know how it works: diff --git a/lisp/files.el b/lisp/files.el index d89b2f5..21f7bdc 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2316,7 +2316,10 @@ normal-mode or from Lisp without specifying the optional argument FIND-FILE; in that case, this function acts as if `enable-local-variables' were t." (interactive) - (fundamental-mode) + (kill-all-local-variables) + (unless delay-mode-hooks + (run-hooks 'change-major-mode-after-body-hook + 'after-change-major-mode-hook)) (let ((enable-local-variables (or (not find-file) enable-local-variables))) ;; FIXME this is less efficient than it could be, since both ;; s-a-m and h-l-v may parse the same regions, looking for "mode:". -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri May 06 10:34:07 2016 Received: (at control) by debbugs.gnu.org; 6 May 2016 14:34:07 +0000 Received: from localhost ([127.0.0.1]:41896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aygpT-0000D3-0r for submit@debbugs.gnu.org; Fri, 06 May 2016 10:34:07 -0400 Received: from mail-oi0-f47.google.com ([209.85.218.47]:35119) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aygpR-0000CX-7y for control@debbugs.gnu.org; Fri, 06 May 2016 10:34:05 -0400 Received: by mail-oi0-f47.google.com with SMTP id x19so140713907oix.2 for ; Fri, 06 May 2016 07:34:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc; bh=rlqAr7JDaRFJ6tZC8Rsl/3/d+EVwOWeO6n2KoaF/tXQ=; b=ClMbAskM4izt28XBqGcBwwyiPnMB0ka0OO390rsw33jwaHyVTUytPYuD9yGdi+dcgW /04W00+y2cakfuRFGcA44L5mxG1oh+6H2h35yLufcqLe0eab6hDGC+kKWf0RznNhFbiO l2VH7YXBw3PEipp1I9ceCGLqTDIb4Jtbav8K9L6X6I0vi62SF+ZXuyLMOx5ARfHBCQR5 fW0Tk6ie2coUbw2OrhaAGzHi7UTclFw9LGTPGnY0+TmWp3gqxbTKw0VE1illD1NDsbgZ BabkYeMxrVkSTXRaqEIukLLJVmyAmVFFKUmFjrkyhdbVHG7s67IGLy2a18gB4dHw9rxF PpXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=rlqAr7JDaRFJ6tZC8Rsl/3/d+EVwOWeO6n2KoaF/tXQ=; b=jKlGBa8fVkSZXatoLSI9bmXAq9yPeITh5B+BmKySf6QQHbNfOBpMI+lANSHJlrOnvM gWmcZ4wewxv8cfDAM/XaDptE3e+5VxhCKwvabPPLdDyBIcYIkMoNZJz0SL5Nx9ZUMrzi QhELriz1O07gqSyDei0KCuDsSAXgYiWW865uVtGDNHgfJ4oQNmMVjcJ4gZ3pcZMEzhh+ 6rHKfjbG939XgG84QiLkn34i05hC+Oc1VtfoNHG/5ZFS9fRjzO6Ao8vWary4+kBzKYfi v78PCK4Nx74HtHcEcCWHOntcimD3lrbTbenT3m+GphgivXujNr+d2KlHEpSJVO8tijpx UWlQ== X-Gm-Message-State: AOPr4FXwGwR1/XzndPAsG/mcew/DcINCfuNUk4vHfWMWBr5qdg+jHik6gjGqqiSZB1DoeWsYi3ryNH/nf/hhLQ== X-Received: by 10.157.0.68 with SMTP id 62mr10364091ota.189.1462545239854; Fri, 06 May 2016 07:33:59 -0700 (PDT) MIME-Version: 1.0 From: Kaushal Modi Date: Fri, 06 May 2016 14:33:50 +0000 Message-ID: Subject: Merge 23460 and 23463 To: "control@debbugs.gnu.org" Content-Type: multipart/alternative; boundary=94eb2c0441f47d553b05322d5939 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control Cc: Alan Mackenzie , Glenn Morris 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 (/) --94eb2c0441f47d553b05322d5939 Content-Type: text/plain; charset=UTF-8 merge 23460 23463 -- -- Kaushal Modi --94eb2c0441f47d553b05322d5939 Content-Type: text/html; charset=UTF-8
merge 23460 23463
--

--
Kaushal Modi

--94eb2c0441f47d553b05322d5939-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 06 11:56:01 2016 Received: (at 23463) by debbugs.gnu.org; 6 May 2016 15:56:01 +0000 Received: from localhost ([127.0.0.1]:41945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayi6j-0005YQ-EU for submit@debbugs.gnu.org; Fri, 06 May 2016 11:56:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ayi6i-0005YF-EV for 23463@debbugs.gnu.org; Fri, 06 May 2016 11:56:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ayi6U-0006JL-1T for 23463@debbugs.gnu.org; Fri, 06 May 2016 11:55:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ayi6I-0006Eg-3a; Fri, 06 May 2016 11:55:34 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ayi6B-0003Ub-ED; Fri, 06 May 2016 11:55:27 -0400 From: Glenn Morris To: Alan Mackenzie Subject: Re: bug#23463: safe local variable properties no longer effective References: <20160506091453.GA3898@acm.fritz.box> X-Spook: DDOS MD5 Extreme weather constitution Pakistan Perl-RSA X-Ran: pIDVg$51#2=8R~Z*0EP_NVk%}r:_6#jAyg}9[/Bj8JrPBO9jUl}Pja.#rb`#!3g+8Y/EB/ X-Hue: white X-Debbugs-No-Ack: yes X-Attribution: GM Date: Fri, 06 May 2016 11:55:27 -0400 Message-ID: <7x60urkwpc.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -7.1 (-------) X-Debbugs-Envelope-To: 23463 Cc: 23463@debbugs.gnu.org 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: -7.1 (-------) A test case was provided so you can test it yourself. :) This is a change to very long-standing behaviour, and I would not be surprised to see various subtle issues due to it. Eg calling any major-mode function may now prompt the user and wait indefinitely for a response. I think it needs a NEWS entry, BTW. From debbugs-submit-bounces@debbugs.gnu.org Fri May 06 15:24:19 2016 Received: (at 23463-done) by debbugs.gnu.org; 6 May 2016 19:24:19 +0000 Received: from localhost ([127.0.0.1]:42046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aylMI-0002CW-VL for submit@debbugs.gnu.org; Fri, 06 May 2016 15:24:19 -0400 Received: from mail.muc.de ([193.149.48.3]:41142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aylMG-0002CO-O8 for 23463-done@debbugs.gnu.org; Fri, 06 May 2016 15:24:17 -0400 Received: (qmail 13535 invoked by uid 3782); 6 May 2016 19:24:15 -0000 Received: from acm.muc.de (p548C6264.dip0.t-ipconnect.de [84.140.98.100]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 06 May 2016 21:24:14 +0200 Received: (qmail 10053 invoked by uid 1000); 6 May 2016 19:24:14 -0000 Date: Fri, 6 May 2016 19:24:14 +0000 To: Glenn Morris Subject: Re: bug#23463: safe local variable properties no longer effective Message-ID: <20160506192414.GC3898@acm.fritz.box> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 23463-done Cc: 23463-done@debbugs.gnu.org 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: -2.1 (--) Bug fixed in master branch. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri May 06 15:34:54 2016 Received: (at 23463) by debbugs.gnu.org; 6 May 2016 19:34:54 +0000 Received: from localhost ([127.0.0.1]:42064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aylWY-0002Td-Dz for submit@debbugs.gnu.org; Fri, 06 May 2016 15:34:54 -0400 Received: from mail.muc.de ([193.149.48.3]:36379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aylWX-0002TU-0P for 23463@debbugs.gnu.org; Fri, 06 May 2016 15:34:53 -0400 Received: (qmail 15190 invoked by uid 3782); 6 May 2016 19:34:52 -0000 Received: from acm.muc.de (p548C6264.dip0.t-ipconnect.de [84.140.98.100]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 06 May 2016 21:34:50 +0200 Received: (qmail 10247 invoked by uid 1000); 6 May 2016 19:34:51 -0000 Date: Fri, 6 May 2016 19:34:51 +0000 To: Glenn Morris Subject: Re: bug#23463: safe local variable properties no longer effective Message-ID: <20160506193451.GE3898@acm.fritz.box> References: <20160506091453.GA3898@acm.fritz.box> <7x60urkwpc.fsf@fencepost.gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7x60urkwpc.fsf@fencepost.gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 23463 Cc: 23463@debbugs.gnu.org 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: -2.1 (--) Hello, Glenn. On Fri, May 06, 2016 at 11:55:27AM -0400, Glenn Morris wrote: > A test case was provided so you can test it yourself. :) I have done so. But sometimes, admittedly not very often, a fix works in the test case, but not in the real code the error was observed in. Anyhow, I've committed the fix. > This is a change to very long-standing behaviour, and I would not be > surprised to see various subtle issues due to it. Eg calling any > major-mode function may now prompt the user and wait indefinitely for a > response. This could happen, but only on a file the user has already accepted/rejected the local variables for. > I think it needs a NEWS entry, BTW. Done. -- Alan Mackenzie (Nuremberg, Germany). From unknown Mon Aug 18 00:07:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 04 Jun 2016 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