help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs 27.1 init file not loading


From: Skip Montanaro
Subject: Re: Emacs 27.1 init file not loading
Date: Thu, 20 May 2021 15:27:28 -0500

> What's the value of 'user-init-file' when you run emacs normally
> (without the symlink below)? Itʼs possible emacs is looking for
> '~/.emacs.d/init.el'.

"~/.emacs"

I think I figured it out. In this manual section:

https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html

it explicitly mentions ~/.emacs.el, ~/.emacs, and ~/.emacs.d/init.el. It
also states (emphasis mine):

Emacs can also look in an XDG-compatible location for init.el, the default
is the directory ~/.config/emacs *[this existed but seemed to be ignored]*.
This can be overridden by setting XDG_CONFIG_HOME in your environment, its
value replaces ~/.config in the name of the default XDG init file. However
~/.emacs.d, ~/.emacs, and ~/.emacs.el are always preferred if they exist,
which means that you must delete or rename them in order to use the XDG
location.

Note also that if neither the XDG location nor ~/.emacs.d exist, then Emacs
will create ~/.emacs.d (*and therefore use it during subsequent invocations*
).


I had no XDG_CONFIG_HOME environment variable, so it created ~/.emacs.d
(probably silently), so after that, even when I did set XDG_CONFIG_HOME, it
still preferred the virtually empty ~/.emacs.d. I set XDG_CONFIG_HOME,
removed ~/.emacs.d, and all is once again right with the world.

Skip


reply via email to

[Prev in Thread] Current Thread [Next in Thread]