From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <86ttav6g51.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28420"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 75022@debbugs.gnu.org To: "Jordan Isaacs" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 22 13:46:21 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tPLLf-0007HY-LA for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Dec 2024 13:46:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tPLLR-0002Xo-JG; Sun, 22 Dec 2024 07:46:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPLLP-0002XZ-DB for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 07:46:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tPLLO-0006Sc-IN for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 07:46:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=EsJYxndEINTeqkkIJEfnsUq9UvudGRTKwB9OtV11zwg=; b=R1oqzzVWabTur5/d8HmZfAb/dn8J0CMWOCnWMLZilM08yQOd4Ruacu9pDLyYhJPzp5jdsMNHExGl7nuXGI5jkVfkzeSsF/Vph5C7nM6XVYrJzo6oObyiGQYqcEQMRoRDpynrNVTOpDhvCIIXbSQLhPXHMB+boZFfWxLMUHyqMsTaHzNMjqksIbbQR1x0tRUdEQ8rZnlSgU/qUfKRyPIldAKixup0EYiynndvLNoBHuCpd5sL++XhMi3pJaMmiqzqNyRfpSjY7LGhKvdH6aJx52mqd3wZEH0nFfWVrMrkjCyjNH0G1fdWY5vVxfCDRajGSAulRV1LbikKd1wJpt8v2g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tPLLO-0002BW-5e for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 07:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Dec 2024 12:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75022 X-GNU-PR-Package: emacs Original-Received: via spool by 75022-submit@debbugs.gnu.org id=B75022.17348715138328 (code B ref 75022); Sun, 22 Dec 2024 12:46:02 +0000 Original-Received: (at 75022) by debbugs.gnu.org; 22 Dec 2024 12:45:13 +0000 Original-Received: from localhost ([127.0.0.1]:49342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPLKb-0002AG-6G for submit@debbugs.gnu.org; Sun, 22 Dec 2024 07:45:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPLKZ-00026g-BV for 75022@debbugs.gnu.org; Sun, 22 Dec 2024 07:45:12 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPLKS-0006Mt-12; Sun, 22 Dec 2024 07:45:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=EsJYxndEINTeqkkIJEfnsUq9UvudGRTKwB9OtV11zwg=; b=njoDZtHW4XOr 9dxTl4JeUh1tS0L6HLMERVQvH5hiBEwEz9X/RMqJjWiw9gKbsQWFq0hiLRJCVYFYsEGzCYcaXrojW mBFz3HwV/1B3bmQhs9NiowtHRgb+zpcwBcEaoa4Aehy5kpeUCFnfDpq2IkX1ZkBPZpwRSPFLIh3/U Iofu22+k8cLUOJQTKu56ur05gAESLof4aZYVk+Zjp27Liwo77NbyDK3tgyGSdxReQVHxONGKAbTYq W3iLgfT5RwIu05nfLS1LfB9gYziSv/+ksZArLQSrI1urH7wp8+wBBw7aiVOsmS+QsD/4p3KXaB36S FQ8qX6isUj6hZbs1re51TQ==; In-Reply-To: (jordan@snowytrees.dev) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297599 Archived-At: > Date: Sun, 22 Dec 2024 03:57:01 -0800 > From: "Jordan Isaacs" > > 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.