C-h v
user-init-file
shows
~/.emacs
but I want this user-init-file
point to ~/emacs.d/init.el
Requirement is to be able to switch between .emacs
and .emacs.d/init.el
and .emacs.el
anytime, without deleting/replacing these init files
I do not see any options here
Question:
Without deleting .emacs
file from its place, What is the procedure for emacs user to pick different init file, for future emacs session?
~/.emacs
exists, that takes precedence over~/.emacs.d/init.el
. Simply delete or rename~/.emacs
to something that Emacs doesn't look for, and then it'll find yourinit.el
file. – phils May 15 '17 at 02:35.emacs
. I paste the same reference – overexchange May 15 '17 at 02:37~/.emacs
file and a~/.emacs.d/init.el
file. They are alternative names for a single purpose, and they are both "your own work" in that they are expected to be your personal init file. Pick whichever filename works best for you, and remove the other file. You can most certainly put custom code into multiple different .el files, but those particular filenames are reserved for use as the init filename. – phils May 15 '17 at 02:39HOME
environment variable to/home/xyz/.emacs.d
instead of/home/xyz
? But, It is an environment variable used by OS processes and shell script. – overexchange May 15 '17 at 02:48.emacs
and.emacs.d/init.el
and.emacs.el
anytime, without deleting/replacing these files. How can we solve this, using emacs option? – overexchange May 15 '17 at 02:51emacs -q --load "~/.emacs.d/init.el"
. So,-q
will avoid loading~/.emacs
(if available),--load
option will load specified config file – overexchange May 15 '17 at 03:05emacs -q --load "~/.emacs.d/init.el"
answers your question that please consider posting it as an answer. You can accept your own answer. – Drew May 15 '17 at 04:41