emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mark .dir-locals.el buffer or file as safe instead of variables as s


From: Phil Sainty
Subject: Re: mark .dir-locals.el buffer or file as safe instead of variables as safe
Date: Wed, 27 Jun 2018 16:24:24 +1200
User-agent: Orcon Webmail

On 2018-06-27 12:14, address@hidden wrote:
So, if a mark foo-variable, on trusted land to get rid of confirmation
and just happen to open something on hell itself, by accident or
glory, instead of a peak of dark magic knowledge I could let all hell
break lose.

The trust is not for a variable regardless of its value; it is for a
*specific value* of a variable.

If "hell itself" wanted to set the *same* value that was confirmed on
"trusted land" then Emacs will be happy with that; but if a different
value is used then the user will be prompted to confirm (or not) the
new value as trusted.

A variable can be defined to be a "safe-local-variable" such that a
specified predicate function can validate file-local values, and
automatically trust valid values without bothering the user. Otherwise
the user needs to confirm each distinct value independently.


-Phil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]