From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stuart D. Herring" Newsgroups: gmane.emacs.devel Subject: Re: [angeli@caeruleus.net: custom-set-variables overwritten bysafe-local-variables] Date: Fri, 28 Apr 2006 22:10:40 -0700 (PDT) Message-ID: <25664.128.165.0.81.1146287440.squirrel@webmail.lanl.gov> References: Reply-To: herring@lanl.gov NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1146287462 349 80.91.229.2 (29 Apr 2006 05:11:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 29 Apr 2006 05:11:02 +0000 (UTC) Cc: Ralf Angeli , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 29 07:11:00 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 1FZhjP-0006mZ-9n for ged-emacs-devel@m.gmane.org; Sat, 29 Apr 2006 07:10:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZhjO-0001GL-Ow for ged-emacs-devel@m.gmane.org; Sat, 29 Apr 2006 01:10:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FZhjE-0001G9-Le for emacs-devel@gnu.org; Sat, 29 Apr 2006 01:10:48 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FZhjD-0001Fx-4Z for emacs-devel@gnu.org; Sat, 29 Apr 2006 01:10:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZhjD-0001Fu-1S for emacs-devel@gnu.org; Sat, 29 Apr 2006 01:10:47 -0400 Original-Received: from [192.65.95.54] (helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FZhmU-0007IM-73; Sat, 29 Apr 2006 01:14:10 -0400 Original-Received: from mailrelay3.lanl.gov (mailrelay3.lanl.gov [128.165.4.104]) by mailwasher-b.lanl.gov (8.12.11.20060308/8.12.11/(ccn-5)) with ESMTP id k3T5Ah3G020131; Fri, 28 Apr 2006 23:10:43 -0600 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay3.lanl.gov (8.12.11.20060308/8.12.11/(ccn-5)) with ESMTP id k3T5Aeem014296; Fri, 28 Apr 2006 23:10:41 -0600 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id k3T5AeDW029439; Fri, 28 Apr 2006 23:10:40 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id k3T5AeqM029437; Fri, 28 Apr 2006 22:10:40 -0700 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.0.81 (SquirrelMail authenticated user 196434); by webmail.lanl.gov with HTTP; Fri, 28 Apr 2006 22:10:40 -0700 (PDT) In-Reply-To: Original-To: rms@gnu.org User-Agent: SquirrelMail/1.4.3a-11.EL3 X-Mailer: SquirrelMail/1.4.3a-11.EL3 X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 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:53583 Archived-At: > (todo-show) ; european-calendar-style und number-of-diary-entries > ;; ; schon vorher definiert sein > > > (custom-set-variables > ;; custom-set-variables was added by Custom. > ;; If you edit it by hand, you could mess it up, so be careful. > ;; Your init file should contain only one such instance. > ;; If there is more than one, they won't work right. > '(fill-column 72) > ) > > ; .emacs.el END Well, here's the problem -- the (todo-show) invokes the local-variables warning, before the `custom-set-variables' has taken place. This means that A) the safe-locals setting hasn't taken place yet, so the warning will always occur, and B) if the .emacs is modified by Custom (via the local-variables warning), the fill-column hasn't been set yet and will be forgotten. Simple workaround is to put (todo-show) after the `custom-set-variables'. Better yet, replace with (add-hook 'after-init-hook 'todo-show); .emacs isn't really supposed to be doing anything user-visible (like opening buffers), but it can arrange for it to happen later. I don't know that there's any way to "fix" this, except maybe to have Custom put its forms at the top of the .emacs. But that might cause other problems... Hope this helps, Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.