* New config file
@ 2009-09-29 21:13 emacsuser
2009-09-30 4:37 ` Wang Lei
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: emacsuser @ 2009-09-29 21:13 UTC (permalink / raw)
To: Help-gnu-emacs
Hi,
I am relatively new to emacs. I have been trying to get it to work on Linux.
I was told to rename the config file .emacs to something other than .emacs.
So I called it .emacs-ks. After customizing it, I called it using :
emacs -u .emacs-ks
It loads an emacs session ((not with the default serttings of .emacs). But I
have to type M-x load file, then give .emacs-ks. Only then does the config
settings take effect. I wasn't to be able to call .emacs-ks without using
load file.
My question is, is there any way I can call emacs using a config file with
anem other than .emacs (I need to retain .emacs in my current folder for
other purposes)
Your help is really appreciated. i know this must be a silly problem for all
of you, but please bear with me.
Thanks,
Miki
--
View this message in context: http://www.nabble.com/New-config-file-tp25671046p25671046.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: New config file
2009-09-29 21:13 emacsuser
@ 2009-09-30 4:37 ` Wang Lei
2009-09-30 6:03 ` Kevin Rodgers
2009-09-30 6:18 ` Harry Putnam
2 siblings, 0 replies; 10+ messages in thread
From: Wang Lei @ 2009-09-30 4:37 UTC (permalink / raw)
To: emacsuser; +Cc: Help-gnu-emacs
Look at this line in `emacs --help`
--user, -u USER load ~USER/.emacs instead of your own
-u not followed a file but a username.
Sorry, can't answer your question.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: New config file
[not found] <mailman.7734.1254283138.2239.help-gnu-emacs@gnu.org>
@ 2009-09-30 5:02 ` Richard Riley
2009-09-30 12:58 ` emacsuser
[not found] ` <mailman.7770.1254315520.2239.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 10+ messages in thread
From: Richard Riley @ 2009-09-30 5:02 UTC (permalink / raw)
To: help-gnu-emacs
emacsuser <mekhala.acharya@bms.com> writes:
> Hi,
>
> I am relatively new to emacs. I have been trying to get it to work on Linux.
> I was told to rename the config file .emacs to something other than .emacs.
> So I called it .emacs-ks. After customizing it, I called it using :
> emacs -u .emacs-ks
> It loads an emacs session ((not with the default serttings of .emacs). But I
> have to type M-x load file, then give .emacs-ks. Only then does the config
> settings take effect. I wasn't to be able to call .emacs-ks without using
> load file.
>
> My question is, is there any way I can call emacs using a config file with
> anem other than .emacs (I need to retain .emacs in my current folder for
> other purposes)
>
> Your help is really appreciated. i know this must be a silly problem for all
> of you, but please bear with me.
> Thanks,
> Miki
My ".emacs" is called init.el and resides in ~/.emacs.d
I did this primarily to have all my emacs files in a sub dir so I could
sync that dir with the laptop etc without considering special files in
the home directory.
More info here:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html
Interestingly enough the irc channel #emacs had a few people who were
totally anti this because they considered .emacs.d as a directory where
only emacs put files and anything you put there could be under threat of
being overwritten.
The aside question is why on earth would you have the file ".emacs"
reserved for other things :-;
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: New config file
2009-09-29 21:13 emacsuser
2009-09-30 4:37 ` Wang Lei
@ 2009-09-30 6:03 ` Kevin Rodgers
2009-09-30 6:18 ` Harry Putnam
2 siblings, 0 replies; 10+ messages in thread
From: Kevin Rodgers @ 2009-09-30 6:03 UTC (permalink / raw)
To: help-gnu-emacs
emacsuser wrote:
> I am relatively new to emacs. I have been trying to get it to work on Linux.
> I was told to rename the config file .emacs to something other than .emacs.
> So I called it .emacs-ks. After customizing it, I called it using :
> emacs -u .emacs-ks
> It loads an emacs session ((not with the default serttings of .emacs). But I
> have to type M-x load file, then give .emacs-ks. Only then does the config
> settings take effect. I wasn't to be able to call .emacs-ks without using
> load file.
The -u option takes a user name argument, not a file name. For that, use the
-l option.
> My question is, is there any way I can call emacs using a config file with
> anem other than .emacs (I need to retain .emacs in my current folder for
> other purposes)
>
> Your help is really appreciated. i know this must be a silly problem for all
> of you, but please bear with me.
> Thanks,
> Miki
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: New config file
2009-09-29 21:13 emacsuser
2009-09-30 4:37 ` Wang Lei
2009-09-30 6:03 ` Kevin Rodgers
@ 2009-09-30 6:18 ` Harry Putnam
2009-09-30 6:26 ` Harry Putnam
[not found] ` <mailman.7745.1254292011.2239.help-gnu-emacs@gnu.org>
2 siblings, 2 replies; 10+ messages in thread
From: Harry Putnam @ 2009-09-30 6:18 UTC (permalink / raw)
To: help-gnu-emacs
emacsuser <mekhala.acharya@bms.com> writes:
> It loads an emacs session ((not with the default serttings of .emacs). But I
> have to type M-x load file, then give .emacs-ks. Only then does the config
> settings take effect. I wasn't to be able to call .emacs-ks without using
> load file.
Probably the simplist way would be to create an alias for emacs that
runs emacs -q -l my.config (Or a function)
The -q tells emacs not to load .emacs... and the -l tells emacs to
load whatever filename follows.
The alias route would look like this (in .bashrc) (assuming you are using
bash as your shell)
alias='myem emacs -q -l ~/my.conf' (Use any name (without spaces)
that you want in place of `myem' and `my.conf'.
I usually prefer functions... but either way if fine. A function would
look like (in .bashrc.):
myem () { emacs -q -l ~/my.conf; }
Ditto about the names... but the spacing and format need to be exactly
like that, including the semi-colon... the shell is fussy about functions.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: New config file
2009-09-30 6:18 ` Harry Putnam
@ 2009-09-30 6:26 ` Harry Putnam
[not found] ` <mailman.7745.1254292011.2239.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 10+ messages in thread
From: Harry Putnam @ 2009-09-30 6:26 UTC (permalink / raw)
To: help-gnu-emacs
Harry Putnam <reader@newsguy.com> writes:
> emacsuser <mekhala.acharya@bms.com> writes:
>
>> It loads an emacs session ((not with the default serttings of .emacs). But I
>> have to type M-x load file, then give .emacs-ks. Only then does the config
>> settings take effect. I wasn't to be able to call .emacs-ks without using
>> load file.
>
> Probably the simplist way would be to create an alias for emacs that
> runs emacs -q -l my.config (Or a function)
>
> The -q tells emacs not to load .emacs... and the -l tells emacs to
> load whatever filename follows.
>
> The alias route would look like this (in .bashrc) (assuming you are using
> bash as your shell)
>
> alias='myem emacs -q -l ~/my.conf' (Use any name (without spaces)
> that you want in place of `myem' and `my.conf'.
>
> I usually prefer functions... but either way if fine. A function would
> look like (in .bashrc.):
>
> myem () { emacs -q -l ~/my.conf; }
>
> Ditto about the names... but the spacing and format need to be exactly
> like that, including the semi-colon... the shell is fussy about functions.
I forgot to mention that with either of those you would need to source
.bashrc after putting one of them in there.
Like this . ~/.bashrc or source ~/.bashrc
You could also just do
emacs -q -l my.conf
But if you are trying to get it simplified and don't want to type all
that each time then an alias or function is the way to go
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: New config file
2009-09-30 5:02 ` New config file Richard Riley
@ 2009-09-30 12:58 ` emacsuser
[not found] ` <mailman.7770.1254315520.2239.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 10+ messages in thread
From: emacsuser @ 2009-09-30 12:58 UTC (permalink / raw)
To: Help-gnu-emacs
Thank you so much guys. I finally got it to work with all your input.:-)
Placing my config file in .emacs.d or using the -l option (either one
works) helped. Of course since I needed tor retain the .emacs I used the -l
and it works perfectly. This problem arose because the .emacs files is being
accessed from 2 servers which map to the same .emacs .So I decided to write
a 2 shell scripts which calls 2 different .emacs files. Will not go into the
gory details.
Thanks again,
Miki
Richard Riley-3 wrote:
>
> emacsuser <mekhala.acharya@bms.com> writes:
>
>> Hi,
>>
>> I am relatively new to emacs. I have been trying to get it to work on
>> Linux.
>> I was told to rename the config file .emacs to something other than
>> .emacs.
>> So I called it .emacs-ks. After customizing it, I called it using :
>> emacs -u .emacs-ks
>> It loads an emacs session ((not with the default serttings of .emacs).
>> But I
>> have to type M-x load file, then give .emacs-ks. Only then does the
>> config
>> settings take effect. I wasn't to be able to call .emacs-ks without
>> using
>> load file.
>>
>> My question is, is there any way I can call emacs using a config file
>> with
>> anem other than .emacs (I need to retain .emacs in my current folder for
>> other purposes)
>>
>> Your help is really appreciated. i know this must be a silly problem for
>> all
>> of you, but please bear with me.
>> Thanks,
>> Miki
>
> My ".emacs" is called init.el and resides in ~/.emacs.d
>
> I did this primarily to have all my emacs files in a sub dir so I could
> sync that dir with the laptop etc without considering special files in
> the home directory.
>
> More info here:
>
> http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html
>
> Interestingly enough the irc channel #emacs had a few people who were
> totally anti this because they considered .emacs.d as a directory where
> only emacs put files and anything you put there could be under threat of
> being overwritten.
>
> The aside question is why on earth would you have the file ".emacs"
> reserved for other things :-;
>
>
>
--
View this message in context: http://www.nabble.com/New-config-file-tp25671046p25680563.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: New config file
[not found] ` <mailman.7770.1254315520.2239.help-gnu-emacs@gnu.org>
@ 2009-09-30 23:07 ` Tim X
0 siblings, 0 replies; 10+ messages in thread
From: Tim X @ 2009-09-30 23:07 UTC (permalink / raw)
To: help-gnu-emacs
emacsuser <mekhala.acharya@bms.com> writes:
> Thank you so much guys. I finally got it to work with all your input.:-)
> Placing my config file in .emacs.d or using the -l option (either one
> works) helped. Of course since I needed tor retain the .emacs I used the -l
> and it works perfectly. This problem arose because the .emacs files is being
> accessed from 2 servers which map to the same .emacs .So I decided to write
> a 2 shell scripts which calls 2 different .emacs files. Will not go into the
> gory details.
>
> Thanks again,
> Miki
>
> Richard Riley-3 wrote:
>>
>> emacsuser <mekhala.acharya@bms.com> writes:
>>
>>> Hi,
>>>
>>> I am relatively new to emacs. I have been trying to get it to work on
>>> Linux.
>>> I was told to rename the config file .emacs to something other than
>>> .emacs.
>>> So I called it .emacs-ks. After customizing it, I called it using :
>>> emacs -u .emacs-ks
>>> It loads an emacs session ((not with the default serttings of .emacs).
>>> But I
>>> have to type M-x load file, then give .emacs-ks. Only then does the
>>> config
>>> settings take effect. I wasn't to be able to call .emacs-ks without
>>> using
>>> load file.
>>>
>>> My question is, is there any way I can call emacs using a config file
>>> with
>>> anem other than .emacs (I need to retain .emacs in my current folder for
>>> other purposes)
>>>
>>> Your help is really appreciated. i know this must be a silly problem for
>>> all
>>> of you, but please bear with me.
>>> Thanks,
>>> Miki
>>
>> My ".emacs" is called init.el and resides in ~/.emacs.d
>>
>> I did this primarily to have all my emacs files in a sub dir so I could
>> sync that dir with the laptop etc without considering special files in
>> the home directory.
>>
>> More info here:
>>
>> http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html
>>
>> Interestingly enough the irc channel #emacs had a few people who were
>> totally anti this because they considered .emacs.d as a directory where
>> only emacs put files and anything you put there could be under threat of
>> being overwritten.
>>
>> The aside question is why on earth would you have the file ".emacs"
>> reserved for other things :-;
There is a package called initz (or something similar) which allows you
to have a much more complex .emacs setup. It allows you to split the
file into a number of smaller files and have specific bits loaded
depending on things like the IP address your at or the version of emacs
your running etc. I looked at it a few years ago, but decided not ot use
it as it was over kill for my needs. However, it sounds like it might be
the sort of thing you may find useful. The nice thing about it is that
you can hae a common part that is shared amongst all instances of emacs
you run and then specific setups for different environment needs, such
as different network or different version etc.
Tim
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: New config file
[not found] ` <mailman.7745.1254292011.2239.help-gnu-emacs@gnu.org>
@ 2009-10-18 0:53 ` David Combs
2009-10-18 8:08 ` Tim X
0 siblings, 1 reply; 10+ messages in thread
From: David Combs @ 2009-10-18 0:53 UTC (permalink / raw)
To: help-gnu-emacs
Please explain to me, in maybe a tutorial way that can get included
in the emacs-manual, what's wrong with plain old .emacs in HOME dir?
I mean, this is looking like a big deal. Every book (rms, ETC) and
*info* on emacs says to do it that way, as far as I can remember.
Has that "official policy" changed recently, and if so, why, and
where documented.
Thanks!
David
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: New config file
2009-10-18 0:53 ` David Combs
@ 2009-10-18 8:08 ` Tim X
0 siblings, 0 replies; 10+ messages in thread
From: Tim X @ 2009-10-18 8:08 UTC (permalink / raw)
To: help-gnu-emacs
dkcombs@panix.com (David Combs) writes:
> Please explain to me, in maybe a tutorial way that can get included
> in the emacs-manual, what's wrong with plain old .emacs in HOME dir?
>
> I mean, this is looking like a big deal. Every book (rms, ETC) and
> *info* on emacs says to do it that way, as far as I can remember.
>
> Has that "official policy" changed recently, and if so, why, and
> where documented.
>
As far as I know, this has not changed (at least not under Linux/Unix).
There are alternatives for those who find doing so can create 'clutter'
in their home directory, such as putting it in .emacs.d and there are
some who like to have the custom stuff in its own file. However, as far
as I know, ~/.emacs is still the *standard* way of doing it.
What makes you believe it has changed?
Tim
>
>
--
tcross (at) rapttech dot com dot au
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-10-18 8:08 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.7734.1254283138.2239.help-gnu-emacs@gnu.org>
2009-09-30 5:02 ` New config file Richard Riley
2009-09-30 12:58 ` emacsuser
[not found] ` <mailman.7770.1254315520.2239.help-gnu-emacs@gnu.org>
2009-09-30 23:07 ` Tim X
2009-09-29 21:13 emacsuser
2009-09-30 4:37 ` Wang Lei
2009-09-30 6:03 ` Kevin Rodgers
2009-09-30 6:18 ` Harry Putnam
2009-09-30 6:26 ` Harry Putnam
[not found] ` <mailman.7745.1254292011.2239.help-gnu-emacs@gnu.org>
2009-10-18 0:53 ` David Combs
2009-10-18 8:08 ` Tim X
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).