Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maintaining multiple emacs configurations at the same time

Tags:

emacs

elisp

I want to maintain multiple emacs configurations like emacs-prelude, emacs-starter-kit, and my own custom emacs configuration simultaneously on same user account on same pc.
for that i have setup directories like .emacs1.d, .emacs2.d, .emacs3.d.

Each emacs user directory has a init.el file that should be loaded on startup. Instead of .emacs file i prefer using init.el file.

How do i load these custom config directories?

I tried running emacs --eval '(setq user-emacs-directory "~/.emacs1.d/")'

it just sets the value of user-emacs-directory, but does not load the files from it

like image 428
Archit Avatar asked Jul 05 '13 07:07

Archit


1 Answers

I would try something like

emacs -q --eval '(load-file "~/.emacs1.d/init.el")'

And then you would do something like at the beginning of your init.el files:

(setq user-emacs-directory "~/.emacs1.d/")

(or you can also eval both things as command-line parameters)

like image 82
juanleon Avatar answered Sep 21 '22 11:09

juanleon