GNU bug report logs - #75022
31.0.50; --init-directory sets user-emacs-directory after user eln-cache is set

Previous Next

Package: emacs;

Reported by: "Jordan Isaacs" <jordan <at> snowytrees.dev>

Date: Sun, 22 Dec 2024 12:00:01 UTC

Severity: normal

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 75022 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Jordan Isaacs" <jordan <at> snowytrees.dev>
Cc: 75022 <at> debbugs.gnu.org
Subject: Re: bug#75022: 31.0.50;
 --init-directory sets user-emacs-directory after user eln-cache is set
Date: Sun, 22 Dec 2024 14:44:58 +0200
> Date: Sun, 22 Dec 2024 03:57:01 -0800
> From: "Jordan Isaacs" <jordan <at> snowytrees.dev>
> 
> In startup.el, the user-emacs-directory and the user eln-cache are set up before processing command line args.
> The user eln-cache is then gets updated after the early-init.el is loaded. This leaves a gap where early-init.el is
> loaded without the correct eln-cache directory. This means there will always be a cache miss if the early-init.eln
> file was in the `--init-directory`.
> 
> To fix this, either `--init-directory` needs to be read before setting up the user eln-cache, or a call to `startup--update-eln-cache` needs to be called after command line args are processed since user-emacs-directory may have changed (from `--init-directory`).

You are not supposed to have in early-init.el stuff that needs to be
natively-compiled.  early-init.el is for changing the few variables
which affect the initialization stage, and that doesn't need native
code.  You are supposed to have most of your configuration in the
normal init file, not in early-init.el.

As for the --init-directory, it doesn't affect the search for your
init files, it only affects the value of user-emacs-directory (for
looking up other files).

So I don't think I understand why you are asking for changes in how
the startup code works in Emacs.  Please tell more about your use
case.




This bug report was last modified 195 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.