From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Andrew M. Scott" Newsgroups: gmane.emacs.devel Subject: Re: Clarification on using safe-local-variable-values Date: Wed, 8 Mar 2006 16:50:00 -0700 Message-ID: <17423.28072.2696.723424@chls308.ch.intel.com> References: <200603081955.k28JtxHO009985@chls308.ch.intel.com> <87oe0gu1kb.fsf@stupidchicken.com> <17423.16884.499749.8016@chls308.ch.intel.com> <87u0a8a9ki.fsf@stupidchicken.com> Reply-To: "Andrew M. Scott" NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1141862068 11919 80.91.229.2 (8 Mar 2006 23:54:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Mar 2006 23:54:28 +0000 (UTC) Cc: "Andrew M. Scott" , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 09 00:54:25 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FH8QK-000784-SC for ged-emacs-devel@m.gmane.org; Thu, 09 Mar 2006 00:50:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FH8QK-0002il-5a for ged-emacs-devel@m.gmane.org; Wed, 08 Mar 2006 18:50:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FH8Pz-0002aK-6Q for emacs-devel@gnu.org; Wed, 08 Mar 2006 18:50:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FH8Px-0002Wx-Em for emacs-devel@gnu.org; Wed, 08 Mar 2006 18:50:09 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FH8Pw-0002Wk-U1 for emacs-devel@gnu.org; Wed, 08 Mar 2006 18:50:08 -0500 Original-Received: from [143.182.124.22] (helo=azsmga101.ch.intel.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FH8Sr-0003w8-U0 for emacs-devel@gnu.org; Wed, 08 Mar 2006 18:53:11 -0500 Original-Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 08 Mar 2006 15:50:05 -0800 Original-Received: from sedona.ch.intel.com (HELO sedona.intel.com) ([143.182.201.200]) by azsmga001.ch.intel.com with ESMTP; 08 Mar 2006 15:50:05 -0800 X-IronPort-AV: i="4.02,177,1139212800"; d="scan'208"; a="11643258:sNHT30737882" Original-Received: from chls308.ch.intel.com (chls308.ch.intel.com [143.182.232.83]) by sedona.intel.com (8.12.10/8.12.9/d:) with ESMTP id k28No4lP024700; Wed, 8 Mar 2006 16:50:04 -0700 (MST) X-Envelope-From: amscott1@sedona.ch.intel.com Original-Received: from chls308.ch.intel.com (localhost [127.0.0.1]) by chls308.ch.intel.com (8.12.10/8.12.8/MailSET/client) with ESMTP id k28No42Z031280; Wed, 8 Mar 2006 16:50:04 -0700 Original-Received: (from amscott1@localhost) by chls308.ch.intel.com (8.12.10/8.12.8/MailSET/Submit) id k28No15u031277; Wed, 8 Mar 2006 16:50:01 -0700 Original-To: Chong Yidong In-Reply-To: <87u0a8a9ki.fsf@stupidchicken.com> X-Mailer: VM 7.19 under Emacs 22.0.50.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51389 Archived-At: >>>>> "Chong" == Chong Yidong writes: Chong> "Andrew M. Scott" 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