unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Jordan Isaacs" <jordan@snowytrees.dev>
Cc: 75022@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <86ttav6g51.fsf@gnu.org> (raw)
In-Reply-To: <c6427159-72a3-4bcb-8369-0c9b1a5cf4fc@app.fastmail.com> (jordan@snowytrees.dev)

> Date: Sun, 22 Dec 2024 03:57:01 -0800
> From: "Jordan Isaacs" <jordan@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.





  reply	other threads:[~2024-12-22 12:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-22 11:57 bug#75022: 31.0.50; --init-directory sets user-emacs-directory after user eln-cache is set Jordan Isaacs
2024-12-22 12:44 ` Eli Zaretskii [this message]
2024-12-22 13:12   ` Jordan Isaacs
2024-12-22 16:26     ` Eli Zaretskii
2024-12-22 21:26       ` Jordan Isaacs
     [not found]         ` <86zfkm4l8y.fsf@gnu.org>
2024-12-29 11:25           ` Andrea Corallo

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=86ttav6g51.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=75022@debbugs.gnu.org \
    --cc=jordan@snowytrees.dev \
    /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 public inbox

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

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