all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Andrew M. Scott" <amscott1@sedona.ch.intel.com>
Cc: "Andrew M. Scott" <amscott1@sedona.ch.intel.com>, emacs-devel@gnu.org
Subject: Re: Clarification on using safe-local-variable-values
Date: Wed, 8 Mar 2006 16:50:00 -0700	[thread overview]
Message-ID: <17423.28072.2696.723424@chls308.ch.intel.com> (raw)
In-Reply-To: <87u0a8a9ki.fsf@stupidchicken.com>

>>>>> "Chong" == Chong Yidong <cyd@stupidchicken.com> writes:

    Chong> "Andrew M. Scott" <amscott1@sedona.ch.intel.com> 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

  reply	other threads:[~2006-03-08 23:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-08 19:55 Clarification on using safe-local-variable-values Andrew M. Scott
2006-03-08 20:24 ` Chong Yidong
2006-03-08 20:43   ` Andrew M. Scott
2006-03-08 21:52     ` Chong Yidong
2006-03-08 23:50       ` Andrew M. Scott [this message]
2006-03-09  0:03         ` Chong Yidong
2006-03-09  8:39           ` Kim F. Storm
2006-03-09 14:50             ` Chong Yidong
2006-03-10 23:57               ` Luc Teirlinck
2006-03-11 15:46                 ` Richard Stallman
2006-03-11 23:47               ` Kim F. Storm
2006-03-09 17:14   ` Richard Stallman
2006-03-09 17:14 ` Richard Stallman

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=17423.28072.2696.723424@chls308.ch.intel.com \
    --to=amscott1@sedona.ch.intel.com \
    --cc=emacs-devel@gnu.org \
    /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.