all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Skip Montanaro <skip.montanaro@gmail.com>
To: Robert Pluim <rpluim@gmail.com>
Cc: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Emacs 27.1 init file not loading
Date: Thu, 20 May 2021 15:27:28 -0500	[thread overview]
Message-ID: <CANc-5UyLzKO=Et4Bem3D4EWhBiB7Lbspxch_t0NJ5UORE-ekgw@mail.gmail.com> (raw)
In-Reply-To: <874kex5xsb.fsf@gmail.com>

> 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	other threads:[~2021-05-20 20:27 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 [this message]
2021-05-21  9:01     ` Robert Pluim
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANc-5UyLzKO=Et4Bem3D4EWhBiB7Lbspxch_t0NJ5UORE-ekgw@mail.gmail.com' \
    --to=skip.montanaro@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=rpluim@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.