unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Now Emacs emits strange warnings
@ 2024-05-05  0:36 Angelo Graziosi
  2024-05-05  5:47 ` Eli Zaretskii
  2024-05-05  8:43 ` Now Emacs emits strange warnings; lexical-bindings... is that what we intend? Mattias Engdegård
  0 siblings, 2 replies; 21+ messages in thread
From: Angelo Graziosi @ 2024-05-05  0:36 UTC (permalink / raw)
  To: emacs-devel

After building Master on GNU/Linux Mint, at the start Emacs emits 
warnings like these:

Warning (lexical-binding): File 
/Emacs/share/emacs/30.0.50/site-lisp/subdirs.el lacks `lexical-binding' 
directive on its first line
Warning (lexical-binding): File /Emacs/share/emacs/site-lisp/subdirs.el 
lacks `lexical-binding' directive on its first line
...

similar warnings for my init.el, custom.el and for a package from 
ELPA/MELPA (sr-speedbar-20210922).


Any idea why this occurs and how to stop that?

TIA,
  Angelo.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings
  2024-05-05  0:36 Now Emacs emits strange warnings Angelo Graziosi
@ 2024-05-05  5:47 ` Eli Zaretskii
  2024-05-05  8:16   ` Angelo Graziosi
                     ` (3 more replies)
  2024-05-05  8:43 ` Now Emacs emits strange warnings; lexical-bindings... is that what we intend? Mattias Engdegård
  1 sibling, 4 replies; 21+ messages in thread
From: Eli Zaretskii @ 2024-05-05  5:47 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

> Date: Sun, 5 May 2024 02:36:32 +0200
> From: Angelo Graziosi <angelo.g0@libero.it>
> 
> After building Master on GNU/Linux Mint, at the start Emacs emits 
> warnings like these:
> 
> Warning (lexical-binding): File 
> /Emacs/share/emacs/30.0.50/site-lisp/subdirs.el lacks `lexical-binding' 
> directive on its first line
> Warning (lexical-binding): File /Emacs/share/emacs/site-lisp/subdirs.el 
> lacks `lexical-binding' directive on its first line
> ...
> 
> similar warnings for my init.el, custom.el and for a package from 
> ELPA/MELPA (sr-speedbar-20210922).
> 
> 
> Any idea why this occurs and how to stop that?

Doesn't happen here, so make sure you are in sync with the latest
master branch, and if you are, "make bootstrap" for a good measure.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings
  2024-05-05  5:47 ` Eli Zaretskii
@ 2024-05-05  8:16   ` Angelo Graziosi
  2024-05-05  8:21     ` Angelo Graziosi
  2024-05-05  8:27     ` Angelo Graziosi
  2024-05-05  8:35   ` Angelo Graziosi
                     ` (2 subsequent siblings)
  3 siblings, 2 replies; 21+ messages in thread
From: Angelo Graziosi @ 2024-05-05  8:16 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Il 05/05/2024 07:47, Eli Zaretskii ha scritto:
>> Date: Sun, 5 May 2024 02:36:32 +0200
>> From: Angelo Graziosi <angelo.g0@libero.it>
>>
>> After building Master on GNU/Linux Mint, at the start Emacs emits
>> warnings like these:
>>
>> Warning (lexical-binding): File
>> /Emacs/share/emacs/30.0.50/site-lisp/subdirs.el lacks `lexical-binding'
>> directive on its first line
>> Warning (lexical-binding): File /Emacs/share/emacs/site-lisp/subdirs.el
>> lacks `lexical-binding' directive on its first line
>> ...
>>
>> similar warnings for my init.el, custom.el and for a package from
>> ELPA/MELPA (sr-speedbar-20210922).
>>
>>
>> Any idea why this occurs and how to stop that?
> 
> Doesn't happen here, so make sure you are in sync with the latest
> master branch, and if you are, "make bootstrap" for a good measure.

The master was old 11 hours, i.e. commit 
043bb36312039f60a464b918daa1dd214cd369f1:

Stefan Monnier (eglot--track-changes-signal): Improve last fix (bug#70541)

and the warnings were both on GNU/Linux and Windows build.

May be things changed in the last 11 hours...

I will try other builds.. I build always fro scratch using 
https://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-master.tar.gz 
as source.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings
  2024-05-05  8:16   ` Angelo Graziosi
@ 2024-05-05  8:21     ` Angelo Graziosi
  2024-05-05  8:27     ` Angelo Graziosi
  1 sibling, 0 replies; 21+ messages in thread
From: Angelo Graziosi @ 2024-05-05  8:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel



Il 05/05/2024 10:16, Angelo Graziosi ha scritto:
> Il 05/05/2024 07:47, Eli Zaretskii ha scritto:
>>> Date: Sun, 5 May 2024 02:36:32 +0200
>>> From: Angelo Graziosi <angelo.g0@libero.it>
>>>
>>> After building Master on GNU/Linux Mint, at the start Emacs emits
>>> warnings like these:
>>>
>>> Warning (lexical-binding): File
>>> /Emacs/share/emacs/30.0.50/site-lisp/subdirs.el lacks `lexical-binding'
>>> directive on its first line
>>> Warning (lexical-binding): File /Emacs/share/emacs/site-lisp/subdirs.el
>>> lacks `lexical-binding' directive on its first line
>>> ...
>>>
>>> similar warnings for my init.el, custom.el and for a package from
>>> ELPA/MELPA (sr-speedbar-20210922).
>>>
>>>
>>> Any idea why this occurs and how to stop that?
>>
>> Doesn't happen here, so make sure you are in sync with the latest
>> master branch, and if you are, "make bootstrap" for a good measure.
> 
> The master was old 11 hours, i.e. commit 
> 043bb36312039f60a464b918daa1dd214cd369f1:
> 
> Stefan Monnier (eglot--track-changes-signal): Improve last fix (bug#70541)
> 
> and the warnings were both on GNU/Linux and Windows build.
> 
> May be things changed in the last 11 hours...
> 
> I will try other builds.. I build always fro scratch using 
> https://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-master.tar.gz 
> as source.

Now I discovered this commit which should confirm the warnings:

https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=1121f17d7c4bc3b71edcd0799b894f50aa3a715e

or not?




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings
  2024-05-05  8:16   ` Angelo Graziosi
  2024-05-05  8:21     ` Angelo Graziosi
@ 2024-05-05  8:27     ` Angelo Graziosi
  1 sibling, 0 replies; 21+ messages in thread
From: Angelo Graziosi @ 2024-05-05  8:27 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel



Il 05/05/2024 10:16, Angelo Graziosi ha scritto:
> Il 05/05/2024 07:47, Eli Zaretskii ha scritto:
>>> Date: Sun, 5 May 2024 02:36:32 +0200
>>> From: Angelo Graziosi <angelo.g0@libero.it>
>>>
>>> After building Master on GNU/Linux Mint, at the start Emacs emits
>>> warnings like these:
>>>
>>> Warning (lexical-binding): File
>>> /Emacs/share/emacs/30.0.50/site-lisp/subdirs.el lacks `lexical-binding'
>>> directive on its first line
>>> Warning (lexical-binding): File /Emacs/share/emacs/site-lisp/subdirs.el
>>> lacks `lexical-binding' directive on its first line
>>> ...
>>>
>>> similar warnings for my init.el, custom.el and for a package from
>>> ELPA/MELPA (sr-speedbar-20210922).
>>>
>>>
>>> Any idea why this occurs and how to stop that?
>>
>> Doesn't happen here, so make sure you are in sync with the latest
>> master branch, and if you are, "make bootstrap" for a good measure.
> 
> The master was old 11 hours, i.e. commit 
> 043bb36312039f60a464b918daa1dd214cd369f1:
> 
> Stefan Monnier (eglot--track-changes-signal): Improve last fix (bug#70541)
> 
> and the warnings were both on GNU/Linux and Windows build.
> 
> May be things changed in the last 11 hours...
> 
> I will try other builds.. I build always fro scratch using 
> https://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-master.tar.gz 
> as source.

Oops may be there is a misunderstanding: the warnings occurs when Emacs 
starts not when Emacs builds.. When Emacs starts the window is splitte 
and a Warning buffer shows up..



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings
  2024-05-05  5:47 ` Eli Zaretskii
  2024-05-05  8:16   ` Angelo Graziosi
@ 2024-05-05  8:35   ` Angelo Graziosi
  2024-05-05  8:43   ` Angelo Graziosi
  2024-05-07 12:43   ` Angelo Graziosi
  3 siblings, 0 replies; 21+ messages in thread
From: Angelo Graziosi @ 2024-05-05  8:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel



Il 05/05/2024 07:47, Eli Zaretskii ha scritto:
>> Date: Sun, 5 May 2024 02:36:32 +0200
>> From: Angelo Graziosi <angelo.g0@libero.it>
>>
>> After building Master on GNU/Linux Mint, at the start Emacs emits
>> warnings like these:
>>
>> Warning (lexical-binding): File
>> /Emacs/share/emacs/30.0.50/site-lisp/subdirs.el lacks `lexical-binding'
>> directive on its first line
>> Warning (lexical-binding): File /Emacs/share/emacs/site-lisp/subdirs.el
>> lacks `lexical-binding' directive on its first line
>> ...
>>
>> similar warnings for my init.el, custom.el and for a package from
>> ELPA/MELPA (sr-speedbar-20210922).
>>
>>
>> Any idea why this occurs and how to stop that?
> 
> Doesn't happen here, so make sure you are in sync with the latest
> master branch, and if you are, "make bootstrap" for a good measure.

This post summarize very well my thoughts: 
https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg00328.html



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings; lexical-bindings... is that what we intend?
  2024-05-05  0:36 Now Emacs emits strange warnings Angelo Graziosi
  2024-05-05  5:47 ` Eli Zaretskii
@ 2024-05-05  8:43 ` Mattias Engdegård
  2024-05-05  8:52   ` Angelo Graziosi
  2024-05-05 17:32   ` Jim Porter
  1 sibling, 2 replies; 21+ messages in thread
From: Mattias Engdegård @ 2024-05-05  8:43 UTC (permalink / raw)
  To: Angelo Graziosi, Pedro Andres Aranda Gutierrez; +Cc: emacs-devel

[ merging threads for efficiency ]

5 maj 2024 kl. 02.36 skrev Angelo Graziosi <angelo.g0@libero.it>:

> Warning (lexical-binding): File /Emacs/share/emacs/30.0.50/site-lisp/subdirs.el lacks `lexical-binding' directive on its first line
> Warning (lexical-binding): File /Emacs/share/emacs/site-lisp/subdirs.el lacks `lexical-binding' directive on its first line
> ...
> 
> similar warnings for my init.el, custom.el and for a package from ELPA/MELPA (sr-speedbar-20210922).

Angelo and Pedro, thank you for telling us! The warning hasn't been fine-tuned yet, but your reports may help us do that.

The reason for all this is that lexical-binding will be the default in Emacs 31 and the files you are seeing complaints will change meaning at that point. Perhaps we should postpone the warning entirely until then, or at least keep quiet about files under the user-emacs-directory (~/.emacs.d/).

Would you mind telling us why you are loading these files from source code, instead of byte-compiling them? Normally, ELPA packages are compiled when they are installed.

This is not an admonishment: we just want to break as little code and cause as little friction as possible.




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings
  2024-05-05  5:47 ` Eli Zaretskii
  2024-05-05  8:16   ` Angelo Graziosi
  2024-05-05  8:35   ` Angelo Graziosi
@ 2024-05-05  8:43   ` Angelo Graziosi
  2024-05-07 12:43   ` Angelo Graziosi
  3 siblings, 0 replies; 21+ messages in thread
From: Angelo Graziosi @ 2024-05-05  8:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel



Il 05/05/2024 07:47, Eli Zaretskii ha scritto:
>> Date: Sun, 5 May 2024 02:36:32 +0200
>> From: Angelo Graziosi <angelo.g0@libero.it>
>>
>> After building Master on GNU/Linux Mint, at the start Emacs emits
>> warnings like these:
>>
>> Warning (lexical-binding): File
>> /Emacs/share/emacs/30.0.50/site-lisp/subdirs.el lacks `lexical-binding'
>> directive on its first line
>> Warning (lexical-binding): File /Emacs/share/emacs/site-lisp/subdirs.el
>> lacks `lexical-binding' directive on its first line
>> ...
>>
>> similar warnings for my init.el, custom.el and for a package from
>> ELPA/MELPA (sr-speedbar-20210922).
>>
>>
>> Any idea why this occurs and how to stop that?
> 
> Doesn't happen here, so make sure you are in sync with the latest
> master branch, and if you are, "make bootstrap" for a good measure.

I have just built Emacs from last master and still there are the 
warnings when it starts. I had to apply patches similar this one:

--- custom.el~  2023-09-10 00:16:22.101172200 +0200
+++ custom.el   2024-05-05 02:42:31.522942400 +0200
@@ -1,3 +1,4 @@
+;;; custom.el --- Emacs custom file  -*- lexical-binding: t -*-
  (custom-set-variables
   ;; custom-set-variables was added by Custom.
   ;; If you edit it by hand, you could mess it up, so be careful.

and it is a bit annoying.

In a forum I met people which have left the the "church" of Emacs in 
favor of other editor (neovim, VS... etc) after more than 10 years...



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings; lexical-bindings... is that what we intend?
  2024-05-05  8:43 ` Now Emacs emits strange warnings; lexical-bindings... is that what we intend? Mattias Engdegård
@ 2024-05-05  8:52   ` Angelo Graziosi
  2024-05-05  9:03     ` Angelo Graziosi
  2024-05-05  9:40     ` Mattias Engdegård
  2024-05-05 17:32   ` Jim Porter
  1 sibling, 2 replies; 21+ messages in thread
From: Angelo Graziosi @ 2024-05-05  8:52 UTC (permalink / raw)
  To: Mattias Engdegård, Pedro Andres Aranda Gutierrez; +Cc: emacs-devel



Il 05/05/2024 10:43, Mattias Engdegård ha scritto:
> [ merging threads for efficiency ]
> 
> 5 maj 2024 kl. 02.36 skrev Angelo Graziosi <angelo.g0@libero.it>:
> 
>> Warning (lexical-binding): File /Emacs/share/emacs/30.0.50/site-lisp/subdirs.el lacks `lexical-binding' directive on its first line
>> Warning (lexical-binding): File /Emacs/share/emacs/site-lisp/subdirs.el lacks `lexical-binding' directive on its first line
>> ...
>>
>> similar warnings for my init.el, custom.el and for a package from ELPA/MELPA (sr-speedbar-20210922).
> 
> Angelo and Pedro, thank you for telling us! The warning hasn't been fine-tuned yet, but your reports may help us do that.
> 
> The reason for all this is that lexical-binding will be the default in Emacs 31 and the files you are seeing complaints will change meaning at that point. Perhaps we should postpone the warning entirely until then, or at least keep quiet about files under the user-emacs-directory (~/.emacs.d/).
> 
> Would you mind telling us why you are loading these files from source code, instead of byte-compiling them? Normally, ELPA packages are compiled when they are installed.
> 
> This is not an admonishment: we just want to break as little code and cause as little friction as possible.
> 

init.el and custom.el should byte-compiled. The sr-speedbar package is 
installed with Emacs: M-x list-packages i etc.. so I do not know why 
that occurs.

I doubt all these warnings will be eliminated for all users and, as 
wrote Pedro, they will then push people to other "churches"...





^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings; lexical-bindings... is that what we intend?
  2024-05-05  8:52   ` Angelo Graziosi
@ 2024-05-05  9:03     ` Angelo Graziosi
  2024-05-05 10:17       ` Pedro Andres Aranda Gutierrez
  2024-05-05  9:40     ` Mattias Engdegård
  1 sibling, 1 reply; 21+ messages in thread
From: Angelo Graziosi @ 2024-05-05  9:03 UTC (permalink / raw)
  To: Mattias Engdegård, Pedro Andres Aranda Gutierrez; +Cc: emacs-devel


> 
> init.el and custom.el should byte-compiled. 

oops:

init.el and custom.el should byte-compiled?

is the right writing..



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings; lexical-bindings... is that what we intend?
  2024-05-05  8:52   ` Angelo Graziosi
  2024-05-05  9:03     ` Angelo Graziosi
@ 2024-05-05  9:40     ` Mattias Engdegård
  2024-05-05 11:07       ` Po Lu
  1 sibling, 1 reply; 21+ messages in thread
From: Mattias Engdegård @ 2024-05-05  9:40 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: Pedro Andres Aranda Gutierrez, emacs-devel

5 maj 2024 kl. 10.52 skrev Angelo Graziosi <angelo.g0@libero.it>:

> init.el and custom.el should byte-compiled.

The byte-compiler warns about exactly the same thing, although that warning is also fairly recent.

> The sr-speedbar package is installed with Emacs: M-x list-packages i etc.. so I do not know why that occurs.

That appears to be an unmaintained package, with no update in 8 years.
As a faithful user, maybe you could take over maintenance for it? It's small.




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings; lexical-bindings... is that what we intend?
  2024-05-05  9:03     ` Angelo Graziosi
@ 2024-05-05 10:17       ` Pedro Andres Aranda Gutierrez
  2024-05-05 10:25         ` Eli Zaretskii
  2024-05-05 10:26         ` Angelo Graziosi
  0 siblings, 2 replies; 21+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-05-05 10:17 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: Mattias Engdegård, emacs-devel

To add to the confusion, the message also appears in emacs master with native-compile _disabled_ ...

> El 5 may 2024, a las 11:03, Angelo Graziosi <angelo.g0@libero.it> escribió:
> 
> 
>> init.el and custom.el should byte-compiled. 
> 
> oops:
> 
> init.el and custom.el should byte-compiled?
> 
> is the right writing..




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings; lexical-bindings... is that what we intend?
  2024-05-05 10:17       ` Pedro Andres Aranda Gutierrez
@ 2024-05-05 10:25         ` Eli Zaretskii
  2024-05-05 10:26         ` Angelo Graziosi
  1 sibling, 0 replies; 21+ messages in thread
From: Eli Zaretskii @ 2024-05-05 10:25 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: angelo.g0, mattias.engdegard, emacs-devel

> From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
> Date: Sun, 5 May 2024 12:17:00 +0200
> Cc: Mattias Engdegård <mattias.engdegard@gmail.com>,
>  emacs-devel <emacs-devel@gnu.org>
> 
> To add to the confusion, the message also appears in emacs master with native-compile _disabled_ ...

This has nothing to do with native compilation, so it's small surprise
you see it even without that.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings; lexical-bindings... is that what we intend?
  2024-05-05 10:17       ` Pedro Andres Aranda Gutierrez
  2024-05-05 10:25         ` Eli Zaretskii
@ 2024-05-05 10:26         ` Angelo Graziosi
  1 sibling, 0 replies; 21+ messages in thread
From: Angelo Graziosi @ 2024-05-05 10:26 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Mattias Engdegård, emacs-devel



Il 05/05/2024 12:17, Pedro Andres Aranda Gutierrez ha scritto:
> To add to the confusion, the message also appears in emacs master with native-compile _disabled_ ...

I always build with that..

> 
>> El 5 may 2024, a las 11:03, Angelo Graziosi <angelo.g0@libero.it> escribió:
>>
>>
>>> init.el and custom.el should byte-compiled.
>>
>> oops:
>>
>> init.el and custom.el should byte-compiled?
>>
>> is the right writing..
> 



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings; lexical-bindings... is that what we intend?
  2024-05-05  9:40     ` Mattias Engdegård
@ 2024-05-05 11:07       ` Po Lu
  2024-05-05 15:47         ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 21+ messages in thread
From: Po Lu @ 2024-05-05 11:07 UTC (permalink / raw)
  To: Mattias Engdegård
  Cc: Angelo Graziosi, Pedro Andres Aranda Gutierrez, emacs-devel

Mattias Engdegård <mattias.engdegard@gmail.com> writes:

> That appears to be an unmaintained package, with no update in 8 years.

Then it's the wiser decision to allow it to continue functioning, as it
has for 8 years at the minimum, by not throwing artificial impediments
in its way...



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings; lexical-bindings... is that what we intend?
  2024-05-05 11:07       ` Po Lu
@ 2024-05-05 15:47         ` Pedro Andres Aranda Gutierrez
  0 siblings, 0 replies; 21+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-05-05 15:47 UTC (permalink / raw)
  To: Po Lu; +Cc: Mattias Engdegård, Angelo Graziosi, emacs-devel

I’m not in the mood to do mailing list archeology, but I remember a very wise discussion around lexical binding and assuming it to be the default a long time ago. It was really informative and my surprise is partially due to this message appearing, because ever since I’ve been assuming lexical binding in (locate-user-emacs-file “init.el”) and things it loads.

/PA

> El 5 may 2024, a las 13:07, Po Lu <luangruo@yahoo.com> escribió:
> 
> Mattias Engdegård <mattias.engdegard@gmail.com> writes:
> 
>> That appears to be an unmaintained package, with no update in 8 years.
> 
> Then it's the wiser decision to allow it to continue functioning, as it
> has for 8 years at the minimum, by not throwing artificial impediments
> in its way...




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings; lexical-bindings... is that what we intend?
  2024-05-05  8:43 ` Now Emacs emits strange warnings; lexical-bindings... is that what we intend? Mattias Engdegård
  2024-05-05  8:52   ` Angelo Graziosi
@ 2024-05-05 17:32   ` Jim Porter
  2024-05-06  6:00     ` Pedro Andres Aranda Gutierrez
  1 sibling, 1 reply; 21+ messages in thread
From: Jim Porter @ 2024-05-05 17:32 UTC (permalink / raw)
  To: Mattias Engdegård, Angelo Graziosi,
	Pedro Andres Aranda Gutierrez
  Cc: emacs-devel

On 5/5/2024 1:43 AM, Mattias Engdegård wrote:
> Angelo and Pedro, thank you for telling us! The warning hasn't been fine-tuned yet, but your reports may help us do that.

Maybe warn only once about files under user-emacs-directory? Or only 
once for all files loaded before Emacs has fully-completed startup?

As a bonus, we could offer a command that will add the lexical-binding 
cookie to all the files Emacs has noticed it's missing from. (Here, we 
could ask the user whether they want to keep lexical-binding off in 
those files for compatibility, or if they're prefer to upgrade to use 
lexical-binding, with the small risk of some breakage.)

Getting spammed with warnings is surely annoying, but a single warning 
with a "fix it" button seems like it would be a lot better.

And, as mentioned elsewhere in another thread, we could probably do with 
making it more obvious that you can suppress warnings. I was in a 
previous discussion about just that, and *still* forgot about it until 
someone reminded me.



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings; lexical-bindings... is that what we intend?
  2024-05-05 17:32   ` Jim Porter
@ 2024-05-06  6:00     ` Pedro Andres Aranda Gutierrez
  0 siblings, 0 replies; 21+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-05-06  6:00 UTC (permalink / raw)
  To: Jim Porter; +Cc: Mattias Engdegård, Angelo Graziosi, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2189 bytes --]

Hi

that would be great. Maybe, just maybe, either start a discussion whether
we should assume lexical-binding as a default for the user configuration
(which was my understanding of a desirable future for Emacs) and, of
course, make sure this assumption holds. As stated somewhere recently,
*scratch* assumes lexical binding and many users test out their own code on
scratch before adding it to their configuration. In a list, options to
discuss would be:

1.- should init.el be assumed to use lexical binding?
2.- should files loaded by it be assumed to use lexical binding?
3.- should custom.el and early-init.el be assumed to use lexical binding?
4.- should we assume lexical binding by default and allow it to be disabled
with a mode line.

My .02 cents, /PA

On Sun, 5 May 2024 at 19:32, Jim Porter <jporterbugs@gmail.com> wrote:

> On 5/5/2024 1:43 AM, Mattias Engdegård wrote:
> > Angelo and Pedro, thank you for telling us! The warning hasn't been
> fine-tuned yet, but your reports may help us do that.
>
> Maybe warn only once about files under user-emacs-directory? Or only
> once for all files loaded before Emacs has fully-completed startup?
>
> As a bonus, we could offer a command that will add the lexical-binding
> cookie to all the files Emacs has noticed it's missing from. (Here, we
> could ask the user whether they want to keep lexical-binding off in
> those files for compatibility, or if they're prefer to upgrade to use
> lexical-binding, with the small risk of some breakage.)
>
> Getting spammed with warnings is surely annoying, but a single warning
> with a "fix it" button seems like it would be a lot better.
>
> And, as mentioned elsewhere in another thread, we could probably do with
> making it more obvious that you can suppress warnings. I was in a
> previous discussion about just that, and *still* forgot about it until
> someone reminded me.
>


-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 2859 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings
  2024-05-05  5:47 ` Eli Zaretskii
                     ` (2 preceding siblings ...)
  2024-05-05  8:43   ` Angelo Graziosi
@ 2024-05-07 12:43   ` Angelo Graziosi
  2024-05-07 12:54     ` Andreas Schwab
  2024-05-07 13:24     ` Eli Zaretskii
  3 siblings, 2 replies; 21+ messages in thread
From: Angelo Graziosi @ 2024-05-07 12:43 UTC (permalink / raw)
  To: emacs-devel

Why the */site-lisp/subdirs.el files are generated without the 
lexical-binding string?

In build-aux/update-subdirs I read

   rm -f subdirs.el~
   echo ";; In load-path, after this directory should come  -*- 
lexical-binding: t -*-

and the log says it is there since 2020..


BTW, in this thread I discovered that clicking on the "icons" Warnings I 
can stop the warnings: this action add something like this

'(warning-suppress-log-types '((lexical-binding))))

to custom.el. But this sounds like sweeping the dust under the carpet 
not eliminating the dust...



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings
  2024-05-07 12:43   ` Angelo Graziosi
@ 2024-05-07 12:54     ` Andreas Schwab
  2024-05-07 13:24     ` Eli Zaretskii
  1 sibling, 0 replies; 21+ messages in thread
From: Andreas Schwab @ 2024-05-07 12:54 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

On Mai 07 2024, Angelo Graziosi wrote:

> Why the */site-lisp/subdirs.el files are generated without the
> lexical-binding string?

See write_subdir in the toplevel makefile.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Now Emacs emits strange warnings
  2024-05-07 12:43   ` Angelo Graziosi
  2024-05-07 12:54     ` Andreas Schwab
@ 2024-05-07 13:24     ` Eli Zaretskii
  1 sibling, 0 replies; 21+ messages in thread
From: Eli Zaretskii @ 2024-05-07 13:24 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

> Date: Tue, 7 May 2024 14:43:59 +0200
> From: Angelo Graziosi <angelo.g0@libero.it>
> 
> Why the */site-lisp/subdirs.el files are generated without the 
> lexical-binding string?
> 
> In build-aux/update-subdirs I read
> 
>    rm -f subdirs.el~
>    echo ";; In load-path, after this directory should come  -*- 
> lexical-binding: t -*-
> 
> and the log says it is there since 2020..

AFAICT, build-aux/update-subdirs is not used for site-lisp.

OTOH, why would we need lexical-binding cookie in subdirs.el?

> BTW, in this thread I discovered that clicking on the "icons" Warnings I 
> can stop the warnings:

Yes, this is what that ⛔ Emoji is about.



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2024-05-07 13:24 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-05  0:36 Now Emacs emits strange warnings Angelo Graziosi
2024-05-05  5:47 ` Eli Zaretskii
2024-05-05  8:16   ` Angelo Graziosi
2024-05-05  8:21     ` Angelo Graziosi
2024-05-05  8:27     ` Angelo Graziosi
2024-05-05  8:35   ` Angelo Graziosi
2024-05-05  8:43   ` Angelo Graziosi
2024-05-07 12:43   ` Angelo Graziosi
2024-05-07 12:54     ` Andreas Schwab
2024-05-07 13:24     ` Eli Zaretskii
2024-05-05  8:43 ` Now Emacs emits strange warnings; lexical-bindings... is that what we intend? Mattias Engdegård
2024-05-05  8:52   ` Angelo Graziosi
2024-05-05  9:03     ` Angelo Graziosi
2024-05-05 10:17       ` Pedro Andres Aranda Gutierrez
2024-05-05 10:25         ` Eli Zaretskii
2024-05-05 10:26         ` Angelo Graziosi
2024-05-05  9:40     ` Mattias Engdegård
2024-05-05 11:07       ` Po Lu
2024-05-05 15:47         ` Pedro Andres Aranda Gutierrez
2024-05-05 17:32   ` Jim Porter
2024-05-06  6:00     ` Pedro Andres Aranda Gutierrez

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).