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: `custom-file' and init-file [was: user-controlled load-path extension: load-dir] Date: Thu, 10 Mar 2011 11:52:28 +0900 Message-ID: <87ipvry9eb.fsf@uwakimon.sk.tsukuba.ac.jp> References: <87ei6mz24h.fsf@lifelogs.com> <20110306072147.GA11067@event-horizon.homenet> <871v2i525h.fsf@lifelogs.com> <87oc5lx607.fsf@lifelogs.com> <874o7ds37p.fsf@lifelogs.com> <4D7726E8.5090206@swipnet.se> <4D772988.4070209@gmail.com> <4D775002.8050100@swipnet.se> <87y64oouuf.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1299725401 24321 80.91.229.12 (10 Mar 2011 02:50:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 10 Mar 2011 02:50:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: Evans Winner Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 10 03:49:55 2011 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.69) (envelope-from ) id 1PxVwp-0001h7-BK for ged-emacs-devel@m.gmane.org; Thu, 10 Mar 2011 03:49:55 +0100 Original-Received: from localhost ([127.0.0.1]:59306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxVwo-0005i9-P8 for ged-emacs-devel@m.gmane.org; Wed, 09 Mar 2011 21:49:54 -0500 Original-Received: from [140.186.70.92] (port=40020 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxVwj-0005i2-Ss for emacs-devel@gnu.org; Wed, 09 Mar 2011 21:49:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxVwi-0008G7-LH for emacs-devel@gnu.org; Wed, 09 Mar 2011 21:49:49 -0500 Original-Received: from mgmt2.sk.tsukuba.ac.jp ([130.158.97.224]:42854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxVwi-0008FV-6T for emacs-devel@gnu.org; Wed, 09 Mar 2011 21:49:48 -0500 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt2.sk.tsukuba.ac.jp (Postfix) with ESMTP id D22939706B1; Thu, 10 Mar 2011 11:49:43 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 574181A2749; Thu, 10 Mar 2011 11:52:29 +0900 (JST) In-Reply-To: <87y64oouuf.fsf@gmail.com> X-Mailer: VM 8.1.93a under 21.5 (beta29) "garbanzo" f5a5501814f5 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.158.97.224 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:137013 Archived-At: Evans Winner writes: > Out of curiosity, would this complicate the process of Emacs > installation? That depends on whether the recommendation to use a separate custom-file is strong enough to put in an automatic "migration" process. XEmacs did that; many users went to the trouble of acknowledging its convenience, but other users suffered data loss while converting .emacs to XEmacs conventions. That said, such data loss is rather unlikely for Emacs users (the problem occurs if the init file signals while loading; this is unlikely in Emacs -- few users mess with installing a new Emacs while their .emacs is non-working! -- but is somewhat likely if you load an .emacs designed for Emacs into XEmacs). > Is the idea that the first time a user runs > Emacs, it checks to see if there is a .emacs in (getenv > "HOME"), and if not, creates it? In Drew's scheme, that would probably be the way to go. (This is very safe compared to "migrating" an existing .emacs.) In the XEmacs scheme (which normally loads custom-file after the init file), it's unnecessary. > Would that complicate things for system administrators? Slightly. Probably not a big deal though. The .emacs file is explicitly for users to customize, so system administrators should not count on it being present or on it containing particular code. That's what the site init and default files are for. > The result, and I can't be alone in this, is that I make the > call to load the custom file at the beginning of my .emacs, > so that if I happen to have defined something twice by > mistake (or because I am too lazy to fix it) the result will > be whatever I have defined in my .emacs. This requires a bit of extra one-time effort in the XEmacs scheme (which implicitly loads custom-file after the init file). We consider it worth it because of the convenience and transparency of the process for almost all users. Since the snippet used is entirely generic, it could be wrapped up in a function `load-custom-file-now' or similar.