From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: always put Customizations in `custom-file', never in `user-init-file' Date: Tue, 11 Dec 2007 06:19:22 +0900 Message-ID: <873auadz8l.fsf@uwakimon.sk.tsukuba.ac.jp> References: <475DA1D2.7020701@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1197321388 14663 80.91.229.12 (10 Dec 2007 21:16:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Dec 2007 21:16:28 +0000 (UTC) Cc: Drew Adams , Emacs-Devel To: "Lennart Borgman (gmail)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 10 22:16:37 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J1pzK-0004lJ-Ru for ged-emacs-devel@m.gmane.org; Mon, 10 Dec 2007 22:16:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1pz3-0007wT-4h for ged-emacs-devel@m.gmane.org; Mon, 10 Dec 2007 16:16:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J1pyz-0007uT-4o for emacs-devel@gnu.org; Mon, 10 Dec 2007 16:16:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J1pyx-0007si-KB for emacs-devel@gnu.org; Mon, 10 Dec 2007 16:16:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J1pyx-0007sf-Eq for emacs-devel@gnu.org; Mon, 10 Dec 2007 16:16:07 -0500 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J1pyx-0002l8-Lq for emacs-devel@gnu.org; Mon, 10 Dec 2007 16:16:07 -0500 Original-Received: from uwakimon.sk.tsukuba.ac.jp (unknown [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id A07A48003; Tue, 11 Dec 2007 06:16:04 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 5922A11FA3F; Tue, 11 Dec 2007 06:19:23 +0900 (JST) In-Reply-To: <475DA1D2.7020701@gmail.com> X-Mailer: VM 7.17 under 21.5 (beta28) "fuki" (+CVS-20070621) XEmacs Lucid X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:84977 Archived-At: Lennart Borgman (gmail) writes: > Drew Adams wrote: > > I think it was probably a mistake ever to have put Customize customizations > > into a file intended for editing. That can confuse users, and it's just > > asking for trouble. Now that we have a good alternative (`custom-file'), I > > think that should be used exclusively. > ... > > WDOT? Be very careful. In particular, the natural idea of migrating by loading the init file and using Custom to save its internal state to a custom-file caused no end of pain to users when it was implemented in XEmacs. If there is any error in the init file, you can lose all customizations. > Great. And I guess custom-file should be run after .emacs, since that > makes it possible to chose another custom-file. Experience in XEmacs showed that users often want to use information in the custom-file in their init files. There were issues (maybe XEmacs-specific) with initial values for faces, too. After the init file was run was too late. It's easy enough to load the custom-file late for those users for whom that matters: don't use the default name. Something like (defvar custom-file "custom.el") (defvar default-custom-file-loaded-p nil) (progn (do-emacs-early-initializations) (when (file-readable-p custom-file) (load custom-file)) (load user-init-file) (when (and (not default-custom-file-loaded-p) (file-readable-p custom-file)) (load custom-file)))