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#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Date: Thu, 17 Nov 2022 16:00:11 +0200 Message-ID: <83wn7td6l0.fsf@gnu.org> References: <8335aheqct.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5660"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59334@debbugs.gnu.org To: Juanma Barranquero , Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 17 15:01:33 2022 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 1ovfSO-0001Fi-U3 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Nov 2022 15:01:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovfRz-0005wU-3q; Thu, 17 Nov 2022 09:01:07 -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 1ovfRu-0005uy-U7 for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 09:01:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovfRu-0005zm-Jd for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 09:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ovfRu-0007hi-5A for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 09:01: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: Thu, 17 Nov 2022 14:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs Original-Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166869362329559 (code B ref 59334); Thu, 17 Nov 2022 14:01:02 +0000 Original-Received: (at 59334) by debbugs.gnu.org; 17 Nov 2022 14:00:23 +0000 Original-Received: from localhost ([127.0.0.1]:59566 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovfRG-0007gh-Ng for submit@debbugs.gnu.org; Thu, 17 Nov 2022 09:00:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovfRD-0007gQ-00 for 59334@debbugs.gnu.org; Thu, 17 Nov 2022 09:00:21 -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 1ovfR5-0005m8-Qe; Thu, 17 Nov 2022 09:00:12 -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=l2EYjhjw96YJWriiXS/WoOkKQMsJkecK70jb8ty+Jbk=; b=K6eBEJ0QZzVR F4HGw+BLr3Q1bi51QC2PS1VHfFAvMcJUqB2jvxOLv2S6FpTKSZkwQXfIA8nqsyRHQuRK/Z8le8IwA WP/qgsh87TdlCaZdydJfmTrg2SE5khT74HVdkhx9TbEz+hrD9T4z7LN68iklHPAtG5Nuv65gDVHyx KEC6sfHEJ02HANDpSKCRPC9/rUtjBA84qgBelPERtTt9+IZF7wVCqO+vAhXfUuaWEvxTMr1mQPJHG vtXjWdF/+/hjA+i3q45c16348ILr0PrFWhtUAyH0GIV/gMwp9B0IhMi/yTpHCsnAJhaRnexAvICXl h/LPGMVKR6Ax9nkw9Q9ctw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovfR4-0007KA-HL; Thu, 17 Nov 2022 09:00:11 -0500 In-Reply-To: (message from Juanma Barranquero on Thu, 17 Nov 2022 14:30:27 +0100) 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:248122 Archived-At: > From: Juanma Barranquero > Date: Thu, 17 Nov 2022 14:30:27 +0100 > Cc: 59334@debbugs.gnu.org > > M-: (gethash "init-7890dda9-d677a456.eln" comp-eln-to-el-h) RET > > => "d:/mypath/Home/.emacs.d/init.el" OK, thanks. So using this, can you propose a patch for startup--load-user-init-file, where it figures out the name of user-init-file? It happens in this fragment: ;; If we loaded a compiled file, set `user-init-file' to ;; the source version if that exists. (when (equal (file-name-extension user-init-file) "elc") (let* ((source (file-name-sans-extension user-init-file)) (alt (concat source ".el"))) (setq source (cond ((file-exists-p alt) alt) ((file-exists-p source) source) (t nil))) (when source (when (file-newer-than-file-p source user-init-file) (message "Warning: %s is newer than %s" source user-init-file) (sit-for 1)) (setq user-init-file source)))) Note that the gethash trick I suggested needs a _basename_ of the .eln file, without any leading directories. (It is best if you propose a patch because it should be easy for you to test it.) Andrea, do you agree with this solution?