GNU bug report logs - #47843
28.0.50; Setting enable-local-variables to nil *appears* to inhibit lexical-binding (but doesn't)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Phil Sainty <psainty@HIDDEN>; Keywords: moreinfo; dated Sat, 17 Apr 2021 13:53:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 47843 <at> debbugs.gnu.org:


Received: (at 47843) by debbugs.gnu.org; 5 May 2021 12:47:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 05 08:47:01 2021
Received: from localhost ([127.0.0.1]:59939 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1leGvc-0002y9-Rr
	for submit <at> debbugs.gnu.org; Wed, 05 May 2021 08:47:01 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:65071)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1leGvX-0002xz-V5
 for 47843 <at> debbugs.gnu.org; Wed, 05 May 2021 08:46:59 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 59D1C4411A1;
 Wed,  5 May 2021 08:46:50 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 2AEA5440BC6;
 Wed,  5 May 2021 08:46:49 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1620218809;
 bh=RUvN5CJG8BVc3VJ+xk3SwkYaqUt4tauHApnYCiklUAQ=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=jjOfQgov72JxRgCBtVh+57Z2kvaHLSkd1pp9hW5hNEqP8foyQ1EFFOWTQmmSFLfkU
 lvN6A2VuB1vej9tPTb+o4bzjlP1lH6LtfjyE27zdI2bGkZ4doQdEJ1WWYUUnnIjHNr
 yThUkuYeAmkCot/blOMMA6UsWsAPsKKINPdlaL59U/LY5coTR/nWCfCJs2clzzbYF1
 PAvnpjAdQ5RMn4YfXJ63gP6Nu/ibPFq4TjQXy+4ju/KRHWTzggfjy3ilivYSe/bJah
 5wq7IIj2SLyPWm2JWhA6Q/oeGUn3l4+qwo40opSoHYrM3JTqCCwZ/Vdh2GX/pc3IQA
 /qDSPbTdSiNZQ==
Received: from alfajor (76-10-140-76.dsl.teksavvy.com [76.10.140.76])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DAA6212020A;
 Wed,  5 May 2021 08:46:48 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#47843: 28.0.50; Setting enable-local-variables to nil
 *appears* to inhibit lexical-binding (but doesn't)
Message-ID: <jwv35v1jqmx.fsf-monnier+emacs@HIDDEN>
References: <e69baad1-7a4c-a103-c8df-fad88bfdbfce@HIDDEN>
 <87v97y94t6.fsf@HIDDEN>
 <dd44cabe-6a77-4de5-bf54-1b8ebf37b913@HIDDEN>
 <87r1il7e40.fsf@HIDDEN>
Date: Wed, 05 May 2021 08:46:42 -0400
In-Reply-To: <87r1il7e40.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Wed,
 05 May 2021 10:56:47 +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.078 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: 47843
Cc: Phil Sainty <psainty@HIDDEN>, 47843 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> Are there are any other file-local variables in that same category?
>> I couldn't think of any offhand, and so this seemed worthy of having
>> an exception made.
>
> Hm...  can't think of any other variables like this, either.
>
> I don't really have an opinion here -- I can see arguments for both
> sides.  Perhaps Stefan has an opinion here (added to the CCs).

Indeed, an exception would be welcome for that var, otherwise there will
be bad surprises.  We could probably have a variable holding a list of
vars that always obey file-local settings.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47843; Package emacs. Full text available.

Message received at 47843 <at> debbugs.gnu.org:


Received: (at 47843) by debbugs.gnu.org; 5 May 2021 08:57:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 05 04:57:01 2021
Received: from localhost ([127.0.0.1]:58742 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1leDL2-0006TO-Pj
	for submit <at> debbugs.gnu.org; Wed, 05 May 2021 04:57:01 -0400
Received: from quimby.gnus.org ([95.216.78.240]:33704)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1leDL0-0006TG-GB
 for 47843 <at> debbugs.gnu.org; Wed, 05 May 2021 04:56:59 -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=6pFgVTSBR808etscuN5Lm42xCklz9SNgPippZoB8YfY=; b=BekiWnTUAzwzd3osr0BLjksUdE
 RIgJQtMyjcLZZUx8USRyRVJK3DSnBR1WEy61wBj6sku2dRe+vpVIqqc/RV8eIsYLeaGYDSyXjr9pB
 WfGcxOY8TDNfpVfC8TelXhqnmdtHAoiCs8zgjs9nXHmBuyoSruCRzKIEQOZ2er22vvEY=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1leDKq-0006qT-2K; Wed, 05 May 2021 10:56:51 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Phil Sainty <psainty@HIDDEN>
Subject: Re: bug#47843: 28.0.50; Setting enable-local-variables to nil
 *appears* to inhibit lexical-binding (but doesn't)
References: <e69baad1-7a4c-a103-c8df-fad88bfdbfce@HIDDEN>
 <87v97y94t6.fsf@HIDDEN>
 <dd44cabe-6a77-4de5-bf54-1b8ebf37b913@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEUjFBNZJBF2SAul
 RA/Nhwr////S7MhlAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UFBQg2G3gJVvIAAAGvSURBVDjLdZSB
 saMwDESl5AqQzC/g204B2KKCQP813coGYo6cZjJJ9JB2kQVExJxtWQ0RQlUhUtqDc502B6rK/v8E
 oeRWIj3FsgNcmA0lZU+cgFVtAYhHi1NEg9m2qpy9zx+TQURZ6SYC5bdONScZQRO3ArshlH8qJrNc
 wWNtOTldBRTAi6Z8OugAJc2sTpHGAAkCHoUhwmkoY4GzMhU2IVvKWPXwMRbehKutV6XXavGJHKzI
 RQlg/rO50DRfwGNV+lkZN8pXQLA6GcCbrq2acQfrPU8EsGzlC4iEo4lfegn5dFhujaAvwxkesWDE
 DxlO/YhA/wGIGoTuGoiS6DtobXyVbqzttZ/z4C3/+p3oAT5Hsq0+DIhEHVtxsG0T4tjBUICd396E
 w+ByBVg7lOA+eOaLK4BlLdi559znKSdYFquV6Onu+GMMFZVT2QF11+075Ehh7pMn/QBfVfLVOcbF
 +1OGvLSr/Taxyu3TNWIbEO8Ae55E+s6byz7LXq8hHTOYfG1/fg+QEpqgFK+MF7T3h8hBtuqkFaNT
 88IdmKXkQFhe3SODJLP2+onqE3x7+i8iTzq2pPwrqAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0w
 NS0wNVQwODo1NDoyNyswMDowMPpatDgAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDUtMDVUMDg6
 NTQ6MjcrMDA6MDCLBwyEAAAAAElFTkSuQmCC
X-Now-Playing: Bark Psychosis's _Manman_: "Tooled Up"
Date: Wed, 05 May 2021 10:56:47 +0200
In-Reply-To: <dd44cabe-6a77-4de5-bf54-1b8ebf37b913@HIDDEN> (Phil
 Sainty's message of "Tue, 4 May 2021 23:45:12 +1200")
Message-ID: <87r1il7e40.fsf@HIDDEN>
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: Phil Sainty <psainty@HIDDEN> writes: > I see the same
 thing. I also note that `eval-region' produces the > same result as
 `eval-defun'. (I'd only tested `eval-buffer' initially,
 > and that respects the `lexical-binding' setting.) 
 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: 0.0 (/)
X-Debbugs-Envelope-To: 47843
Cc: 47843 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Phil Sainty <psainty@HIDDEN> writes:

> I see the same thing.  I also note that `eval-region' produces the
> same result as `eval-defun'.  (I'd only tested `eval-buffer' initially,
> and that respects the `lexical-binding' setting.)

Ah, right.  Hm...  well, I guess that's kinda logical?  But it's a bit
confusing; yes...

> My main point was that I'm dubious that enable-local-variables should
> be allowed to affect lexical-binding in any situation.
>
> While it's strictly true that the lexical-binding implementation
> utilises a file-local variable, I feel like this particular variable
> should be guaranteed to be respected when set, because it fundamentally
> changes how the code will be interpreted.
>
> Are there are any other file-local variables in that same category?
> I couldn't think of any offhand, and so this seemed worthy of having
> an exception made.

Hm...  can't think of any other variables like this, either.

I don't really have an opinion here -- I can see arguments for both
sides.  Perhaps Stefan has an opinion here (added to the CCs).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47843; Package emacs. Full text available.

Message received at 47843 <at> debbugs.gnu.org:


Received: (at 47843) by debbugs.gnu.org; 4 May 2021 11:45:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 07:45:33 2021
Received: from localhost ([127.0.0.1]:52731 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldtUM-0004dm-5J
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 07:45:33 -0400
Received: from smtp-4.orcon.net.nz ([60.234.4.59]:33265)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <psainty@HIDDEN>) id 1ldtUJ-0004de-GV
 for 47843 <at> debbugs.gnu.org; Tue, 04 May 2021 07:45:16 -0400
Received: from [101.53.216.162] (port=59117 helo=[192.168.20.103])
 by smtp-4.orcon.net.nz with esmtpa (Exim 4.90_1)
 (envelope-from <psainty@HIDDEN>)
 id 1ldtUG-0006Q1-N8; Tue, 04 May 2021 23:45:13 +1200
Subject: Re: bug#47843: 28.0.50; Setting enable-local-variables to nil
 *appears* to inhibit lexical-binding (but doesn't)
To: Lars Ingebrigtsen <larsi@HIDDEN>
References: <e69baad1-7a4c-a103-c8df-fad88bfdbfce@HIDDEN>
 <87v97y94t6.fsf@HIDDEN>
From: Phil Sainty <psainty@HIDDEN>
Message-ID: <dd44cabe-6a77-4de5-bf54-1b8ebf37b913@HIDDEN>
Date: Tue, 4 May 2021 23:45:12 +1200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <87v97y94t6.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: 7bit
X-GeoIP: NZ
X-Spam_score: -2.9
X-Spam_score_int: -28
X-Spam_bar: --
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 47843
Cc: 47843 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 4/05/21 10:22 pm, Lars Ingebrigtsen wrote:
> `C-M-x' on the two forms failed, as expected.  (When enabling the
> variable, they are successful.)
> 
> So I think everything works as expected here?  That is, the buffer
> doesn't use lexical mode if you set enable-local-variables to nil.
> 
> Are you seeing something different?

I see the same thing.  I also note that `eval-region' produces the
same result as `eval-defun'.  (I'd only tested `eval-buffer' initially,
and that respects the `lexical-binding' setting.)

My main point was that I'm dubious that enable-local-variables should
be allowed to affect lexical-binding in any situation.

While it's strictly true that the lexical-binding implementation
utilises a file-local variable, I feel like this particular variable
should be guaranteed to be respected when set, because it fundamentally
changes how the code will be interpreted.

Are there are any other file-local variables in that same category?
I couldn't think of any offhand, and so this seemed worthy of having
an exception made.


-Phil




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47843; Package emacs. Full text available.
Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 47843 <at> debbugs.gnu.org:


Received: (at 47843) by debbugs.gnu.org; 4 May 2021 10:22:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 06:22:43 2021
Received: from localhost ([127.0.0.1]:52336 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldsCR-0005fl-0L
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 06:22:43 -0400
Received: from quimby.gnus.org ([95.216.78.240]:51986)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1ldsCN-0005fc-Qu
 for 47843 <at> debbugs.gnu.org; Tue, 04 May 2021 06:22:40 -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=tH+ZPmEfN31QDmnryvOmvrF6eAdcqgnr66mu3MT2iso=; b=WGIbk/9Zmj4ZN/MbYFklDRTHtq
 yLumPVLKgu/2ZgQspf23GOqWS1uTNag9XIQ72+8j8965ZioccWJ8nRipF5nXO7nzime6cemf0/fjm
 kJ/hTiSS93GRS2m7RauVvoJMN7aqtN2BLsTFm5DRRc1JgcJS/02gtW8q7ntvmSH7Fktk=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1ldsCE-00014V-1W; Tue, 04 May 2021 12:22:32 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Phil Sainty <psainty@HIDDEN>
Subject: Re: bug#47843: 28.0.50; Setting enable-local-variables to nil
 *appears* to inhibit lexical-binding (but doesn't)
References: <e69baad1-7a4c-a103-c8df-fad88bfdbfce@HIDDEN>
X-Now-Playing: Burial Hex's _Burial Hex - Zola Jesus_: "Temple of the Flood"
Date: Tue, 04 May 2021 12:22:29 +0200
In-Reply-To: <e69baad1-7a4c-a103-c8df-fad88bfdbfce@HIDDEN> (Phil
 Sainty's message of "Sun, 18 Apr 2021 01:51:51 +1200")
Message-ID: <87v97y94t6.fsf@HIDDEN>
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: Phil Sainty <psainty@HIDDEN> writes: > With
 enable-local-variables
 set to nil, when editing an elisp buffer > using lexical-binding it can *seem*
 as though lexical-binding is not > enabled, as -*- lexical-binding: t -*-
 is being inhibite [...] 
 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: 0.0 (/)
X-Debbugs-Envelope-To: 47843
Cc: 47843 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Phil Sainty <psainty@HIDDEN> writes:

> With enable-local-variables set to nil, when editing an elisp buffer
> using lexical-binding it can *seem* as though lexical-binding is not
> enabled, as -*- lexical-binding: t -*- is being inhibited along with
> any others.
>
> Experimentally, Emacs appears to do the right thing, still evaluating
> the code using lexical-binding.  I tested loading compiled and
> uncompiled code, as well as `eval-buffer', and all of those seemed
> to work correctly.

enable-local-variables doesn't affect byte-compiling or loading the
file -- only the current buffer settings.

So I tried visiting this file, with enable-local-variables set to nil:

;; -*- lexical-binding: t; -*-

(defun foo ()
  (let ((a 1))
    (lambda ()
      (message "%s" a))))

(funcall (foo))

And `C-M-x' on the two forms failed, as expected.  (When enabling the
variable, they are successful.)

So I think everything works as expected here?  That is, the buffer
doesn't use lexical mode if you set enable-local-variables to nil.

Are you seeing something different?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#47843; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Apr 2021 13:52:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 17 09:52:04 2021
Received: from localhost ([127.0.0.1]:42505 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lXlMh-0000Ms-P2
	for submit <at> debbugs.gnu.org; Sat, 17 Apr 2021 09:52:03 -0400
Received: from lists.gnu.org ([209.51.188.17]:59164)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <psainty@HIDDEN>) id 1lXlMg-0000Mb-34
 for submit <at> debbugs.gnu.org; Sat, 17 Apr 2021 09:52:02 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:60502)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <psainty@HIDDEN>)
 id 1lXlMf-0004Ih-RY
 for bug-gnu-emacs@HIDDEN; Sat, 17 Apr 2021 09:52:01 -0400
Received: from smtp-1.orcon.net.nz ([60.234.4.34]:41947)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <psainty@HIDDEN>)
 id 1lXlMe-0007RE-GP
 for bug-gnu-emacs@HIDDEN; Sat, 17 Apr 2021 09:52:01 -0400
Received: from [101.53.216.162] (port=35825 helo=[192.168.20.103])
 by smtp-1.orcon.net.nz with esmtpa (Exim 4.90_1)
 (envelope-from <psainty@HIDDEN>) id 1lXlMV-0001uF-R5
 for bug-gnu-emacs@HIDDEN; Sun, 18 Apr 2021 01:51:52 +1200
To: bug-gnu-emacs@HIDDEN
From: Phil Sainty <psainty@HIDDEN>
Subject: 28.0.50; Setting enable-local-variables to nil *appears* to inhibit
 lexical-binding (but doesn't)
Message-ID: <e69baad1-7a4c-a103-c8df-fad88bfdbfce@HIDDEN>
Date: Sun, 18 Apr 2021 01:51:51 +1200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
 Thunderbird/68.10.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: 7bit
X-GeoIP: NZ
Received-SPF: pass client-ip=60.234.4.34; envelope-from=psainty@HIDDEN;
 helo=smtp-1.orcon.net.nz
X-Spam_score_int: 7
X-Spam_score: 0.7
X-Spam_bar: /
X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.9 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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
 the administrator of that system for details.
 Content preview:  With enable-local-variables set to nil, when editing an elisp
 buffer using lexical-binding it can *seem* as though lexical-binding is not
 enabled, as -*- lexical-binding: t -*- is being inhibited alon [...] 
 Content analysis details:   (1.9 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_SBL_CSS        RBL: Received via a relay in Spamhaus SBL-CSS
 [101.53.216.162 listed in zen.spamhaus.org]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (psainty[at]orcon.net.nz)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,
 medium trust [209.51.188.17 listed in list.dnswl.org]
 0.0 RCVD_IN_MSPIKE_H4      RBL: Very Good reputation (+4)
 [209.51.188.17 listed in wl.mailspike.net]
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.9 (/)

With enable-local-variables set to nil, when editing an elisp buffer
using lexical-binding it can *seem* as though lexical-binding is not
enabled, as -*- lexical-binding: t -*- is being inhibited along with
any others.

Experimentally, Emacs appears to do the right thing, still evaluating
the code using lexical-binding.  I tested loading compiled and
uncompiled code, as well as `eval-buffer', and all of those seemed
to work correctly.

So, as far as I can, see the *only* issue is that inspecting the
local variable suggests differently.  This includes Emacs 28
displaying "elisp/d" (for dynamic binding) in the mode line instead
of "elisp/l".

Should an exception be made for this specific case, so that the
file-local variable is processed even if enable-local-variables
is nil?





Acknowledgement sent to Phil Sainty <psainty@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#47843; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 5 May 2021 13:00:02 UTC

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