From: Robert Pluim <rpluim@gmail.com>
To: Skip Montanaro <skip.montanaro@gmail.com>
Cc: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Emacs 27.1 init file not loading
Date: Fri, 21 May 2021 11:01:23 +0200 [thread overview]
Message-ID: <87v97c4g0s.fsf@gmail.com> (raw)
In-Reply-To: <CANc-5UyLzKO=Et4Bem3D4EWhBiB7Lbspxch_t0NJ5UORE-ekgw@mail.gmail.com> (Skip Montanaro's message of "Thu, 20 May 2021 15:27:28 -0500")
>>>>> On Thu, 20 May 2021 15:27:28 -0500, Skip Montanaro <skip.montanaro@gmail.com> said:
>> 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'.
Skip> "~/.emacs"
Skip> I think I figured it out. In this manual section:
Skip> https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html
Skip> it explicitly mentions ~/.emacs.el, ~/.emacs, and ~/.emacs.d/init.el. It
Skip> also states (emphasis mine):
Skip> Emacs can also look in an XDG-compatible location for init.el, the default
Skip> is the directory ~/.config/emacs *[this existed but seemed to be ignored]*.
Skip> This can be overridden by setting XDG_CONFIG_HOME in your environment, its
Skip> value replaces ~/.config in the name of the default XDG init file. However
Skip> ~/.emacs.d, ~/.emacs, and ~/.emacs.el are always preferred if they exist,
Skip> which means that you must delete or rename them in order to use the XDG
Skip> location.
Note the 'are always preferred' bit.
Skip> Note also that if neither the XDG location nor ~/.emacs.d exist, then Emacs
Skip> will create ~/.emacs.d (*and therefore use it during subsequent invocations*
Skip> ).
Skip> I had no XDG_CONFIG_HOME environment variable, so it created ~/.emacs.d
Skip> (probably silently), so after that, even when I did set XDG_CONFIG_HOME, it
Skip> still preferred the virtually empty ~/.emacs.d. I set XDG_CONFIG_HOME,
Skip> removed ~/.emacs.d, and all is once again right with the world.
If XDG_CONFIG_HOME is unset, then emacs looks in ~/.config/emacs. I
wonder if you were initially running a version of emacs that used
~/.config/emacs/init.el even if ~/.emacs.d existed, but that was
changed before the emacs27 release.
In any case, Iʼm glad you solved it.
Robert
--
next prev parent reply other threads:[~2021-05-21 9:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 13:10 Emacs 27.1 init file not loading Skip Montanaro
2021-05-20 13:40 ` Robert Pluim
2021-05-20 20:27 ` Skip Montanaro
2021-05-21 9:01 ` Robert Pluim [this message]
2021-05-20 13:47 ` Joost Kremers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v97c4g0s.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=skip.montanaro@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).