From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Jordan Isaacs" 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 05:12:47 -0800 Message-ID: <29d07feb-4886-4edd-b4ea-1f1cd5f63549@app.fastmail.com> References: <86ttav6g51.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29966"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 75022@debbugs.gnu.org To: "Eli Zaretskii" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 22 19:52: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 1tPR3r-0007c4-M1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Dec 2024 19:52:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tPR3c-0007AC-Ey; Sun, 22 Dec 2024 13:52:04 -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 1tPR3a-0007A4-6x for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 13:52:02 -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 1tPR3Z-00073W-UY for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 13:52:01 -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:MIME-Version:To:Subject; bh=eKbAipNMi+W4kcFNIwidlRCaflLmu4HNgYg12uNFar8=; b=WqiIIT91Ax8vGlgwpdnBRBhyPAaQYcnJmAZhAkLYtzYpgMsaTyxO+uaMcGaW7TPTBQQcQ5rLesXvm4hBn24z932wSno3rMWE+1sWKQxdzaC3MqaMc5IkIqw9XNGjZ1RjniLWhA3WStCnmX1efUaxtXmQfXf841Xng4q7rmy62Jq4XYi7tY23NLgm179ze4bK7QoJhkPIh6LIq8Bxpkn1TSdkc5MWD6dOtVtzV4AdxFX7QezG6qgSQ3OyxXEfbga+anP4IxZNkWlVy8rpwzOPxwfagM70ctvC+oCUbSHTGpd1Qh1qACNeYPi0mdIyydm/OEmY7G+hAwNIivqyNiHWBQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tPR3Z-0003Hs-Oy for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 13:52:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Jordan Isaacs" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Dec 2024 18:52:01 +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.173489348912594 (code B ref 75022); Sun, 22 Dec 2024 18:52:01 +0000 Original-Received: (at 75022) by debbugs.gnu.org; 22 Dec 2024 18:51:29 +0000 Original-Received: from localhost ([127.0.0.1]:51904 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPR32-0003H2-EK for submit@debbugs.gnu.org; Sun, 22 Dec 2024 13:51:29 -0500 Original-Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]:46117) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPLlj-0003QB-Nt for 75022@debbugs.gnu.org; Sun, 22 Dec 2024 08:13:16 -0500 Original-Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id E294A1380121; Sun, 22 Dec 2024 08:13:07 -0500 (EST) Original-Received: from phl-imap-07 ([10.202.2.97]) by phl-compute-05.internal (MEProxy); Sun, 22 Dec 2024 08:13:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=snowytrees.dev; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm1; t=1734873187; x=1734959587; bh=eKbAipNMi+W4kcFNIwidlRCaflLmu4HN gYg12uNFar8=; b=dONy3hpnYI40iri8DdJxlfMuCbpV6V1S+WFe09tB0za1DWzL EsV3Dr44DCrlHbgci2a9Xt310Hrt8qDUyMcp2nEkZLthXNYbgphe4rIVnAZGWHsX LyZJsg4RmNIonjNnxlnhJFbNc+SXfypwudU30Cn4cpG1oxlkzfZ7FdtY68RdrgE+ 4ensxnZFjmZ1eHEtw50d6xqsHxv//KA6/kKtAhM0fR51i+jaMkXoMeslRITHC4OL HtVtaT4jW7k3pDgcI9zOBxek+6MVrdRK2CkfZ3a0T9haWAIshSXR14yjPejUBPsW gVqH1BX2LQBMBl/KJI5yiYA30ieMamq/ZnWGXA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1734873187; x= 1734959587; bh=eKbAipNMi+W4kcFNIwidlRCaflLmu4HNgYg12uNFar8=; b=D BFSXplQfrDOiMBtL61pHDG6M8BjIDb9y2BM9kZapa9r7d6p++HHPlVL9FDphBUQc y4gbOjfGptSz/8ppG+4atse2F6AoEf1slpvHii9rIkdWWMtjyw/S5vuKlhVxvuUr TtX3/pU34vE/CgteC92jKMt+J8MMXTyL4slvmc0j89N8ItVVry/1Ix/00YXjJjc/ 8PYECJjmrpDAPrft7eUgWSKymfhB2rCFs9BQnLKavDFiI00TxY4TVT8CnHpD8gHR UGArXEqCszwgWJ7zCLdre1w9UFCTQXDPXMxodNiI6HmPzS3QtFocsjxNH1IofaVm 3wDr+/S1VNuFtGE75dYJA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddtkedggeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepofggfffhvfevkfgjfhfutgfgsehtqhertdertdej necuhfhrohhmpedflfhorhgurghnucfkshgrrggtshdfuceojhhorhgurghnsehsnhhofi ihthhrvggvshdruggvvheqnecuggftrfgrthhtvghrnhepuefgtddvffduleevieeuvdff heelueevkeeghedvtdekgeegudffheffkeevgeejnecuffhomhgrihhnpehjugdrlhhotg grlhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehj ohhruggrnhesshhnohifhihtrhgvvghsrdguvghvpdhnsggprhgtphhtthhopedvpdhmoh guvgepshhmthhpohhuthdprhgtphhtthhopeejhedtvddvseguvggssghughhsrdhgnhhu rdhorhhgpdhrtghpthhtohepvghlihiisehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i650149e5:Fastmail Original-Received: by mailuser.phl.internal (Postfix, from userid 501) id A543ABA006F; Sun, 22 Dec 2024 08:13:07 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <86ttav6g51.fsf@gnu.org> X-Mailman-Approved-At: Sun, 22 Dec 2024 13:51:27 -0500 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:297618 Archived-At: > 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). The issue is the `--init-directory` updated the user-emacs-directory, bu= t there was no corresponding call to update the eln-cache directory (startup--up= date-eln-cache). There are comments throughout startup.el about updating the cache direct= ory whenever user-emacs-directory is changed. It is missing that call post command li= ne evaluation. =20 > 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. I have a read-only directory of my init.el and early-init.el along with = the byte compiled versions of them. So I call emacs with --init-directory: /nix/store/ln4pwf5blaqiynydrcn344zn7kbfn6vs-emacs-config =E2=94=9C=E2=94=80=E2=94=80 early-init.el -> /nix/store/qq073crkwrjvpfrf= nsbsqq502c8k0a5y-emacs-config-init-1/share/emacs/site-lisp/early-init.el =E2=94=9C=E2=94=80=E2=94=80 early-init.elc -> /nix/store/qq073crkwrjvpfr= fnsbsqq502c8k0a5y-emacs-config-init-1/share/emacs/site-lisp/early-init.e= lc =E2=94=9C=E2=94=80=E2=94=80 eln-cache =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2=94=80 31.0.50-0186c17f =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 early-init-ca07bda= e-ee82ea37.eln -> /nix/store/qq073crkwrjvpfrfnsbsqq502c8k0a5y-emacs-conf= ig-init-1/share/emacs/native-lisp/31.0.50-0186c17f/early-init-ca07bdae-e= e82ea37.eln =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2=94=80 init-ab609663-d324= ef3d.eln -> /nix/store/qq073crkwrjvpfrfnsbsqq502c8k0a5y-emacs-config-ini= t-1/share/emacs/native-lisp/31.0.50-0186c17f/init-ab609663-d324ef3d.eln =E2=94=9C=E2=94=80=E2=94=80 init.el -> /nix/store/qq073crkwrjvpfrfnsbsqq= 502c8k0a5y-emacs-config-init-1/share/emacs/site-lisp/init.el =E2=94=94=E2=94=80=E2=94=80 init.elc -> /nix/store/qq073crkwrjvpfrfnsbsq= q502c8k0a5y-emacs-config-init-1/share/emacs/site-lisp/init.elc However, when I remove any mutable eln-cache directory I get the followi= ng message: "Error muted by safe_call: (apply native--compile-async ("/nix/store/ln4= pwf5blaqiynydrcn344zn7kbfn6vs-emacs-config/early-init.el" nil late)) sig= naled (error "Cannot find suitable directory for output in =E2=80=98nati= ve-comp-eln-load-path=E2=80=99.")" Or, when I do give it a mutable eln-cache directory, it ends up recompil= ing it in the background doing unnecessary work: /home/jd/.local/state/emacs/eln-cache/31.0.50-0186c17f/ =E2=94=94=E2=94=80=E2=94=80 early-init-ed4380c6-4ba9e9ac.eln When I set add `/nix/store/ln4pwf5blaqiynydrcn344zn7kbfn6vs-emacs-confi= g/eln-cache` to `EMACSNATIVELOADPATH` everything works great. But ideall= y, startup.el should respect `--init-directory` and update the eln-cache= location for you before loading early-init.el