From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: floyd@apaflo.com (Floyd L. Davidson) Newsgroups: gmane.emacs.help Subject: Re: Multiple .emacs files Date: Tue, 12 Sep 2006 10:29:42 -0800 Organization: __________ Message-ID: <8764ftdjl5.fld@apaflo.com> References: <87pse5f4em.fld@apaflo.com> <87irjton8r.fsf@lion.rapttech.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1158086473 5516 80.91.229.2 (12 Sep 2006 18:41:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Sep 2006 18:41:13 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 12 20:41:09 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GNDBr-0001Pu-MK for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Sep 2006 20:41:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNDBr-00089S-0o for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Sep 2006 14:40:59 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!sn-xt-sjc-03!sn-xt-sjc-01!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: gnus 5.10.6/XEmacs 21.4.15/Linux 2.6.17-11 Cancel-Lock: sha1:vCeW3wxTCc9fBV69no3zgH6wfNQ= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 64 Original-Xref: shelby.stanford.edu gnu.emacs.help:141691 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:37313 Archived-At: Kevin Rodgers wrote: >Tim X wrote: >> Mathias Dahl writes: >> >>> floyd@apaflo.com (Floyd L. Davidson) writes: >>> >>>>> I have played a bit with the -u option, but have yet to get it to work >>>>> with a config file named .emacsT >>>> emacs -q -l ~/.emacsT >>> A bit of a warning: I think I saw someone mentioning that doing the >>> above was not exactly like switching your init file. What you do with >>> the above is turn init file loading off and at the same time telling >>> emacs to load another file. I am not sure but maybe things like >>> Customize might not work as you expect (not saving to the .emacsT >>> file). >>> >>> Someone who knows more can probably fill in here, or you can search >>> the archives. >>> >> I have seen others report exactly this problem, so I think it >> is a >> real concern. In particular, you may find that when you go to save >> customize settings, it will fail or save it where you did not expect. >> There is a variable that customize uses which may get around this >> problem if you set it explicitly, but I seem to remember someone >> reporting problems getting this to work as desired/expected. > >Two variables, actually: user-init-file and custom-file. Even if there >are some lingering bugs, it would be a good idea to put something like >this as the the first form in Floyd's ~/.emacsT file: > >(setq user-init-file load-file-name) I gave that particular example to the OP as a "solution" to the specific question, but I certainly do not use that. However, I do something similar fairly often. The actual init file is absolutely minimal... essentially everything it contains is common to any and all desired invocations of (X)Emacs. There are several other init files that are specified with either the -l command line option (via aliased commands so that it is not necessary to actually type it in, or even remember what it is), or by various tricks in the init file that can determine which other files to use. Examples for aliased commands are: for reading news xemacs -l ~/.gemacs -f gnus and to start a gnuserve process xemacs -l ~/.semacs and so on. (The actual aliases or shell functions used can also include various other command line options, such as geometery and window titles...) Things that can be differentiated in the init file itself are, for example, whether it is Emacs or XEmacs that is being executed, or which version of either. -- Floyd L. Davidson Ukpeagvik (Barrow, Alaska) floyd@apaflo.com