[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Clarification on using safe-local-variable-values
From: |
Andrew M. Scott |
Subject: |
Re: Clarification on using safe-local-variable-values |
Date: |
Wed, 8 Mar 2006 16:50:00 -0700 |
>>>>> "Chong" == Chong Yidong <address@hidden> writes:
Chong> "Andrew M. Scott" <address@hidden> writes:
>> % emacs &
>>
>> where: custom-file is "/eng/eng10/amscott1/.emacs-customize"
>> user-init-file is "/eng/eng10/amscott1/.emacs"
>>
>> C-h C-f ~/.mailrc
>>
>> After answering "!" in the *Local Variables* buffer,
>>
>> C-h v safe-local-variable-values returns nil
>>
>> FYI, both my ~/.emacs and ~/.emacs-customize are normally
>> write-protected (under RCS), but even when checked out and
>> running the same commands after emacs invocation, I don't see
>> changes to safe-local-variables-values nor any files.
Chong> That is not my experience. Please send a precise test case.
Chong> For instance, with an empty user init file, I do
Chong> echo "-*- foo: 1 -*-" > foo.txt emacs foo.txt ! C-h v
Chong> safe-local-variable-values RET
Chong> -| safe-local-variable-values is a variable defined in
Chong> `files.el'.
Chong> Its value is ((foo . 1))
Testcase: The issue seems to be with using the alternate Local
Variables section at the end of a file:
% mv .mailrc .mailrc.bak
% echo "# Local Variables:" >! .mailrc
% echo "# after-save-hook: ((lambda () (build-mail-aliases)))" >> .mailrc
% echo "# End:" >> .mailrc
% cat .mailrc
# Local Variables:
# after-save-hook: ((lambda () (build-mail-aliases)))
# End:
% emacs .mailrc and answer the prompt with "!"
C-h v safe-local-variable-values returns nil
safe-local-variable-values is a variable defined in `files.el'.
Its value is nil
^^^^ this is wrong
C-h v after-save-hook
after-save-hook is a variable defined in `files.el'.
Its value is
((lambda nil
(build-mail-aliases)))
Local in buffer .mailrc; global value is
(vm-unblock-new-mail fast-lock-save-cache-after-save-file write-exec-hook)
Documentation:
Normal hook that is run after a buffer is saved to its file.
Andy Scott
- Clarification on using safe-local-variable-values, Andrew M. Scott, 2006/03/08
- Re: Clarification on using safe-local-variable-values, Chong Yidong, 2006/03/08
- Re: Clarification on using safe-local-variable-values, Andrew M. Scott, 2006/03/08
- Re: Clarification on using safe-local-variable-values, Chong Yidong, 2006/03/08
- Re: Clarification on using safe-local-variable-values,
Andrew M. Scott <=
- Re: Clarification on using safe-local-variable-values, Chong Yidong, 2006/03/08
- Re: Clarification on using safe-local-variable-values, Kim F. Storm, 2006/03/09
- Re: Clarification on using safe-local-variable-values, Chong Yidong, 2006/03/09
- Re: Clarification on using safe-local-variable-values, Luc Teirlinck, 2006/03/10
- Re: Clarification on using safe-local-variable-values, Richard Stallman, 2006/03/11
- Re: Clarification on using safe-local-variable-values, Kim F. Storm, 2006/03/11
Re: Clarification on using safe-local-variable-values, Richard Stallman, 2006/03/09
Re: Clarification on using safe-local-variable-values, Richard Stallman, 2006/03/09