[Top][All Lists]

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

Re: Risky local variable mechanism

From: Luc Teirlinck
Subject: Re: Risky local variable mechanism
Date: Tue, 7 Feb 2006 23:48:09 -0600 (CST)

Chong Yidong wrote:

   I don't see how this would help.  As long as it is possible for a user
   to explicitly set a variable as safe, there will be some sort of risk
   of this sort.

If a user knows what he is doing, it is up to him to think of the
risks and decide whether he can live with them.  Such a user can put
(put 'myvar 'safe-local-variable t) in his .emacs.  There is, in my
opinion, no need to make this any more convenient than that, neither
the way you propose it nor the way Stefan proposes it.  Most users are
probably better off not to try to guess whether variables are safe to
set to any value whatsoever or not.

There is no need to provide list variables defined with defcustom that
trick the user into setting these list variables effectively with
setq-default, which is definitely not what they should be doing.

I believe that it is very bad to ask each time _two_ questions to the
user, first "do you want to set this variable to this value now" and
then "is it safe to set this variable to any value whatsoever any time
in the future?".  Constantly repeating that second question each time
the user visits the file, even though he may already have answered
1001 times no to it before, is effectively not only encouraging, but
even pressuring, the reluctant user to finally say yes.



reply via email to

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