Subject: Re: bug#74627: .dir-locals.el warning messages are confusing

From: Eli Zaretskii <[email-masked]>
Date: Thu, 05 Dec 2024 11:38:51 +0200

> From: Björn Lindqvist <[email-masked]>
> Date: Sat, 30 Nov 2024 18:20:35 +0100
> 
> Warnings about potential security issues should be easy to understand,
> but the warnings produced by .dir-locals.el are not. When I open a
> file in the Emacs source code it shows:
> 
>     The local variables list in /home/bjourne/p/emacs/
>     or .dir-locals.el contains values that may not be safe (*).
> 
> Why does it say "or"?

Because that function is called with a single flag argument which
could be set non-nil either due to unsafe file-local variables or due
to .dir-locals.el.

> What does the asterisk (*) mean?

It means the variables marked with the asterisk in the list of
below this text could be unsafe.

> Could the descriptions for "!" and "i" be clearer so it is more
> obvious what is applied and what is ignored?

Please tell what is unclear there.  The current text is

  !  -- to apply the local variables list, and permanently mark these
	values (*) as safe (in the future, they will be set automatically.)
  i  -- to ignore the local variables list, and permanently mark these
	values (*) as ignored"