How do I change the initial file start up from ~/.emacs.el to ~/.emacs.d/init.el? The manual says you can use any of these files for start up but how do I go about changing the prioritization? It also says “You can use the command line switch ‘-q’ to prevent loading your init file”. Unfortunately, i’m not sure what that means. Thank you.
Please check:
Emacs looks for your init file using the filenames ~/.emacs.el, ~/.emacs, or ~/.emacs.d/init.el in that order; you can choose to use any one of these names. So, you can
mv ~/.emacs.el ~/.emacs.d/init.el
start emacs from console using
emacs -q
will not load your init file.
3 Likes
If you use emacs 29 or later you can specify the init directory:
emacs --init-directory /tmp/.emacs.d
2 Likes
You should generally not use emacs -q
, unless you know what you are doing. Most of the time, you want your initialization file to be loaded. I use -q
or -Q
(they mean different things) when I need to test some configuration and I want a blank slate to start with. To get a better understanding of what -q
does, see Initial Options (GNU Emacs Manual)