[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to specify customized configuration file rather than "~/.emacs"
From: |
PJ Weisberg |
Subject: |
Re: How to specify customized configuration file rather than "~/.emacs" ? |
Date: |
Thu, 13 Sep 2012 08:27:46 -0700 |
On Thu, Sep 13, 2012 at 7:38 AM, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:
> On Thu, Sep 13, 2012 at 07:42:59PM +0530, Jambunathan K wrote:
>> Z C <zcnnbb@gmail.com> writes:
>>
>> > I just want emacs to load another file as the configuration file, and
>> > ignore the default file ("~/.emacs").
>> >
>> > Note that I don't want to change the original "~/.emacs" file.
>> >
>> > I've tried to change "$HOME" env variable, but it doesn't work.
>> >
>>
>> Load emacs with custom options.
>>
>> ,----
>> | $ emacs --help | grep load
>> |
>> | --no-desktop do not load a saved desktop
>> | --no-init-file, -q load neither ~/.emacs nor default.el
>> | --no-site-file do not load site-start.el
>> | --user, -u USER load ~USER/.emacs instead of your own
>> | --directory, -L DIR add DIR to variable load-path
>> | --load, -l FILE load Emacs Lisp FILE using the load function
>> `----
>>
>
> To elaborate with an example:
>
> $ emacs -q -l ~/special-config.el
>
> or,
>
> $ emacs -Q -l ~/special-config.el
You'll probably also want to put (setq user-init-file
"~/special-config.el") in that file, or Emacs will refuse to save
customizations
-PJ
Gehm's Corollary to Clark's Law: Any technology distinguishable from
magic is insufficiently advanced.