all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Multiple .emacs files
@ 2006-09-09 15:01 Bill
  0 siblings, 0 replies; 7+ messages in thread
From: Bill @ 2006-09-09 15:01 UTC (permalink / raw)


After and hour or so of searching for the answer, I'm afraid I need to
ask what should be a simple question. How would one go about forcing
emacs to use a different .emacs config file?

I have played a bit with the -u option, but have yet to get it to work
with a config file named .emacsT

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Multiple .emacs files
       [not found] <mailman.6688.1157814085.9609.help-gnu-emacs@gnu.org>
@ 2006-09-09 15:25 ` Floyd L. Davidson
  2006-09-11  6:29   ` Mathias Dahl
  0 siblings, 1 reply; 7+ messages in thread
From: Floyd L. Davidson @ 2006-09-09 15:25 UTC (permalink / raw)


Bill <tfc4@cybcon.com> wrote:
>After and hour or so of searching for the answer, I'm afraid I need to
>ask what should be a simple question. How would one go about forcing
>emacs to use a different .emacs config file?
>
>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

-- 
Floyd L. Davidson            <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@apaflo.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Multiple .emacs files
  2006-09-09 15:25 ` Multiple .emacs files Floyd L. Davidson
@ 2006-09-11  6:29   ` Mathias Dahl
  2006-09-11  7:55     ` Floyd L. Davidson
  2006-09-12  2:03     ` Tim X
  0 siblings, 2 replies; 7+ messages in thread
From: Mathias Dahl @ 2006-09-11  6:29 UTC (permalink / raw)


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.

/Mathias

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Multiple .emacs files
  2006-09-11  6:29   ` Mathias Dahl
@ 2006-09-11  7:55     ` Floyd L. Davidson
  2006-09-12  2:03     ` Tim X
  1 sibling, 0 replies; 7+ messages in thread
From: Floyd L. Davidson @ 2006-09-11  7:55 UTC (permalink / raw)


Mathias Dahl <brakjoller@gmail.com> wrote:
>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 would expect your warning is *exactly* correct!

-- 
Floyd L. Davidson            <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@apaflo.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Multiple .emacs files
  2006-09-11  6:29   ` Mathias Dahl
  2006-09-11  7:55     ` Floyd L. Davidson
@ 2006-09-12  2:03     ` Tim X
  2006-09-12 18:06       ` Kevin Rodgers
       [not found]       ` <mailman.6827.1158084485.9609.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 7+ messages in thread
From: Tim X @ 2006-09-12  2:03 UTC (permalink / raw)


Mathias Dahl <brakjoller@gmail.com> 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.

There is a package out there called something like initz, which
provides a way of splitting up your emacs configuration so that only
certain parts are loaded depending on the emacs being run. I've not
used it myself, but am thinking about it as I'm now running two
different emacsen on a regular basis (emacs 21 and emacs 22 CVS) and
have come across some minor differences that will cause problems when
starting one of the emacsen. I don't know how well this will handle
the customize problem though.

HTH

Tim

-- 
tcross (at) rapttech dot com dot au

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Multiple .emacs files
  2006-09-12  2:03     ` Tim X
@ 2006-09-12 18:06       ` Kevin Rodgers
       [not found]       ` <mailman.6827.1158084485.9609.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Kevin Rodgers @ 2006-09-12 18:06 UTC (permalink / raw)


Tim X wrote:
> Mathias Dahl <brakjoller@gmail.com> 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)

-- 
Kevin

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Multiple .emacs files
       [not found]       ` <mailman.6827.1158084485.9609.help-gnu-emacs@gnu.org>
@ 2006-09-12 18:29         ` Floyd L. Davidson
  0 siblings, 0 replies; 7+ messages in thread
From: Floyd L. Davidson @ 2006-09-12 18:29 UTC (permalink / raw)


Kevin Rodgers <ihs_4664@yahoo.com> wrote:
>Tim X wrote:
>> Mathias Dahl <brakjoller@gmail.com> 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            <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@apaflo.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-09-12 18:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.6688.1157814085.9609.help-gnu-emacs@gnu.org>
2006-09-09 15:25 ` Multiple .emacs files Floyd L. Davidson
2006-09-11  6:29   ` Mathias Dahl
2006-09-11  7:55     ` Floyd L. Davidson
2006-09-12  2:03     ` Tim X
2006-09-12 18:06       ` Kevin Rodgers
     [not found]       ` <mailman.6827.1158084485.9609.help-gnu-emacs@gnu.org>
2006-09-12 18:29         ` Floyd L. Davidson
2006-09-09 15:01 Bill

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.