From: "Björn Lindqvist" <bjourne@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 74627@debbugs.gnu.org
Subject: bug#74627: .dir-locals.el warning messages are confusing
Date: Wed, 11 Dec 2024 09:18:33 +0100 [thread overview]
Message-ID: <CALG+76f9OTpFuHgTye+gUoGNkjOR4bi8Rt8xsss7d3HZs9kwNA@mail.gmail.com> (raw)
In-Reply-To: <86a5daxydw.fsf@gnu.org>
Hello Eli,
Den tors 5 dec. 2024 kl 10:38 skrev Eli Zaretskii <eliz@gnu.org>:
> > 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.
So there are multiple sources of unsafe variables, but the function
responsible for formulating the error message doesn't know what the
source is? Regardless of whether my guess is correct, the text should
not refer to the local variables in "/home/bjourne/p/emacs/" because
there can be no unsafe variables in directories (only files).
> > What does the asterisk (*) mean?
>
> It means the variables marked with the asterisk in the list of
> below this text could be unsafe.
Aha. Emacs lists both safe and unsafe variables. Why does it list the
safe ones? The warning would be much clearer if the safe variables
were omitted since they don't matter. That would make it clear what
variables "!" and "i" choices apply or mark as safe/ignored.
--
mvh/best regards Björn Lindqvist
next prev parent reply other threads:[~2024-12-11 8:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-30 17:20 bug#74627: .dir-locals.el warning messages are confusing Björn Lindqvist
2024-12-05 9:38 ` Eli Zaretskii
2024-12-11 8:18 ` Björn Lindqvist [this message]
2024-12-11 11:16 ` Stefan Kangas
2024-12-11 15:00 ` Eli Zaretskii
2024-12-11 15:31 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-11 16:55 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALG+76f9OTpFuHgTye+gUoGNkjOR4bi8Rt8xsss7d3HZs9kwNA@mail.gmail.com \
--to=bjourne@gmail.com \
--cc=74627@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.