all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs 27.1 init file not loading
@ 2021-05-20 13:10 Skip Montanaro
  2021-05-20 13:40 ` Robert Pluim
  2021-05-20 13:47 ` Joost Kremers
  0 siblings, 2 replies; 5+ messages in thread
From: Skip Montanaro @ 2021-05-20 13:10 UTC (permalink / raw)
  To: Help GNU Emacs

I recently switched from Ubuntu to XUbuntu and in the process lost
Emacs 27.2. The standard repo only had 26.3, so I went looking for
alternative locations and landed here:

https://launchpad.net/~kelleyk/+archive/ubuntu/emacs

That only had 27.1, but I figured "How different could it be?" As it
turns out, it's different in one pretty significant way. Running just
"emacs" from the command line, it fails to find/load
~/.config/emacs/init.el. If I run it like so:

emacs --load ~/.config/emacs/init.el

it does load. I can tell that it doesn't load in the normal case
because I added a couple calls to (message "...") to start and end the
file. They don't show in the minibuffer or the *Messages* buffer
unless I use the more explicit command.

For the time being I just created a symlink from ~/.emacs to
~/.config/emacs/init.el.

Is there a more-or-less standard place to find 27.2 for Debian-like
systems? I know I could download and build Emacs myself, but I'm
getting old and prefer to let the system take care of managing
dependencies and updates. For me the days of compiling and installing
Emacs (or the Linux kernel) on a daily or weekly basis are way in the
past.

Thanks,

Skip



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs 27.1 init file not loading
  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-20 13:47 ` Joost Kremers
  1 sibling, 1 reply; 5+ messages in thread
From: Robert Pluim @ 2021-05-20 13:40 UTC (permalink / raw)
  To: Skip Montanaro; +Cc: Help GNU Emacs

>>>>> On Thu, 20 May 2021 08:10:09 -0500, Skip Montanaro <skip.montanaro@gmail.com> said:

    Skip> I recently switched from Ubuntu to XUbuntu and in the process lost
    Skip> Emacs 27.2. The standard repo only had 26.3, so I went looking for
    Skip> alternative locations and landed here:

    Skip> https://launchpad.net/~kelleyk/+archive/ubuntu/emacs

    Skip> That only had 27.1, but I figured "How different could it be?" As it
    Skip> turns out, it's different in one pretty significant way. Running just
    Skip> "emacs" from the command line, it fails to find/load
    Skip> ~/.config/emacs/init.el. If I run it like so:

    Skip> emacs --load ~/.config/emacs/init.el

    Skip> it does load. I can tell that it doesn't load in the normal case
    Skip> because I added a couple calls to (message "...") to start and end the
    Skip> file. They don't show in the minibuffer or the *Messages* buffer
    Skip> unless I use the more explicit command.

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> For the time being I just created a symlink from ~/.emacs to
    Skip> ~/.config/emacs/init.el.

Robert
-- 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs 27.1 init file not loading
  2021-05-20 13:10 Emacs 27.1 init file not loading Skip Montanaro
  2021-05-20 13:40 ` Robert Pluim
@ 2021-05-20 13:47 ` Joost Kremers
  1 sibling, 0 replies; 5+ messages in thread
From: Joost Kremers @ 2021-05-20 13:47 UTC (permalink / raw)
  To: help-gnu-emacs


On Thu, May 20 2021, Skip Montanaro wrote:
> I recently switched from Ubuntu to XUbuntu and in the process lost
> Emacs 27.2. The standard repo only had 26.3, so I went looking for
> alternative locations and landed here:
>
> https://launchpad.net/~kelleyk/+archive/ubuntu/emacs
>
> That only had 27.1, but I figured "How different could it be?" As it
> turns out, it's different in one pretty significant way. Running just
> "emacs" from the command line, it fails to find/load
> ~/.config/emacs/init.el.

You may want to read:

(info "(emacs) Find Init")

Basically, check to make sure there's no `~.emacs.el`, `~.emacs` or `~/.emacs.d/init.el`.

-- 
Joost Kremers
Life has its moments



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs 27.1 init file not loading
  2021-05-20 13:40 ` Robert Pluim
@ 2021-05-20 20:27   ` Skip Montanaro
  2021-05-21  9:01     ` Robert Pluim
  0 siblings, 1 reply; 5+ messages in thread
From: Skip Montanaro @ 2021-05-20 20:27 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Help GNU Emacs

> 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Emacs 27.1 init file not loading
  2021-05-20 20:27   ` Skip Montanaro
@ 2021-05-21  9:01     ` Robert Pluim
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Pluim @ 2021-05-21  9:01 UTC (permalink / raw)
  To: Skip Montanaro; +Cc: Help GNU Emacs

>>>>> 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
-- 



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-05-21  9:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2021-05-20 13:47 ` Joost Kremers

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.