From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Nov 2022 09:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 59334@debbugs.gnu.org X-Debbugs-Original-To: Bug-Gnu-Emacs Received: via spool by submit@debbugs.gnu.org id=B.16686773728561 (code B ref -1); Thu, 17 Nov 2022 09:30:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Nov 2022 09:29:32 +0000 Received: from localhost ([127.0.0.1]:59116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovbDA-0002E1-2w for submit@debbugs.gnu.org; Thu, 17 Nov 2022 04:29:32 -0500 Received: from lists.gnu.org ([209.51.188.17]:54944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovbD7-0002Dq-8Y for submit@debbugs.gnu.org; Thu, 17 Nov 2022 04:29:30 -0500 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 1ovbD3-0008Vw-NP for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 04:29:25 -0500 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovbD2-00067z-11 for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2022 04:29:25 -0500 Received: by mail-ej1-x62e.google.com with SMTP id bj12so3484213ejb.13 for ; Thu, 17 Nov 2022 01:29:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=ISMHlD78zqrsmLpe6vxZu1GfJ1tSmUgTlbL0emoCbTg=; b=bKe1IO5y5supJy/T5dx0pEKf84Az0fLvfEelR+1OXtctx8RK7Ns6t8SjXxgkif4HzI YWT43lTg614gUaUMfbbsqPGRrn/MSl6pSxcZ4ejPDjanCNCjwgVJpoj3uI5Bb0NGHNHM hWCvN+HWj9DxWuZu1tfotyLPhBoKhHC6Qpel5xLz4SoMIxCWQekroSOcN+o4X1ZwwTjc LaR8An5Lx/dw6fsYeNqBAjFXM/REeYwyxLinN/NiGrR8wRi8ucRyeow2XLJI6/cEWJ3c mrYv7B3px2YnLiYLLIygEfTDbJHJZvtzanzd3NMJ25PhdA5hq2IoWKBng6btx9U8DIWk tT9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ISMHlD78zqrsmLpe6vxZu1GfJ1tSmUgTlbL0emoCbTg=; b=74xzS5o/JwZ3UozXLpTqaI3uwuZ4tfuBamKsnybEU/jY4NluxaniSfeqn6bjAu9vS9 ZLtzApq0oEIAFeHYp8VU4gthXc126kMDlu2vY9AGb38v/DAJKWEedUHmy2pBHehTnM8z +kIqFWHtZ4/g/3463cC7yQsWMaOs0ez5dx3oxzqHUsBKo7iNMBz6A4yZkqJRwaZ06raY UtWo3TTDRBTD8xpMs58ldsy71eDUx5NZ0loLLUDO6EAFXZWuifv5RSWgseulYYlHMUQo SOmdyXcZhv/KJG2+tRmCwrw50b2f+JarZ6cabNUXklu6/XWFaX/n+RZNlFicsiLNcL5A kDPA== X-Gm-Message-State: ANoB5pkKuBvkFiFRbNr/fnwi5IXsdyfgM5BcRIWr3Nu0n5fySMyDeIlZ tzxeWILFUVjYweb+BzlD1U2pkFTGFL2NDg26Y+r8civs29rvnbno X-Google-Smtp-Source: AA0mqf4+UUycxkoFFcSK+VFb0hWvT0Q0PWVi5vrg8D1nUDnusXXybL5Tbv3GSVWW0DX2J98yDpsV6PTDek7Tu0zRKHc= X-Received: by 2002:a17:906:914d:b0:7af:113a:7416 with SMTP id y13-20020a170906914d00b007af113a7416mr1450835ejw.16.1668677360496; Thu, 17 Nov 2022 01:29:20 -0800 (PST) MIME-Version: 1.0 From: Juanma Barranquero Date: Thu, 17 Nov 2022 10:28:44 +0100 Message-ID: Content-Type: multipart/alternative; boundary="0000000000005133b105eda739fc" Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=lekktu@gmail.com; helo=mail-ej1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --0000000000005133b105eda739fc Content-Type: text/plain; charset="UTF-8" emacs -Q M-x byte-compile-file ~/.emacs.d/init.el C-x C-c emacs ;;; init.el is now native-compiled C-h v user-init-file ;;; => "d:/mypath/Home/.emacs.d/init.el" C-x C-c emacs C-h v user-init-file ;;; => "d:/mypath/Home/.emacs.d/native/29.0.50-a4a10996/init-7890dda9-d677a456.eln" --0000000000005133b105eda739fc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

emacs -Q
M-x byte-compile-file <RET> ~/.emacs.d/init= .el <RET>
C-x C-c
emacs
;;; init.el is now native-compiled
C-h v user-in= it-file <RET>
;;; =3D> "d:/mypath/Home/.emacs.d/init.el"
C-x C-c
emacs
C-h v user-init-file <RET>
;;; =3D> "d:/mypath/Home/= .emacs.d/native/29.0.50-a4a10996/init-7890dda9-d677a456.eln"
--0000000000005133b105eda739fc-- From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Nov 2022 12:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: 59334@debbugs.gnu.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.16686868749818 (code B ref 59334); Thu, 17 Nov 2022 12:08:02 +0000 Received: (at 59334) by debbugs.gnu.org; 17 Nov 2022 12:07:54 +0000 Received: from localhost ([127.0.0.1]:59402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovdgQ-0002YI-DV for submit@debbugs.gnu.org; Thu, 17 Nov 2022 07:07:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovdgO-0002Xs-Nx for 59334@debbugs.gnu.org; Thu, 17 Nov 2022 07:07:53 -0500 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 1ovdgJ-00078m-Ey; Thu, 17 Nov 2022 07:07:47 -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=pgfLDx/QGf1tOCiCO7i6yc5V8B492xECagF0JGXvlM8=; b=EZHt9pZzMr3t PGl1QgkLtOxkeJU6946GrplKrJ2BcjRAYTs/3YSqL/qayNB/8i8awe7ZnpqhH3ALKimfSCOTxvRtD hLnUaWJBe/nh4IMIdYSzYwV/wX8h9sZ5evy85su/fBeiQhWTvduhaK6/fkAzZxjAkT+/J9XUJ8/20 lvTEGxkm2IwxGDda0aEsfMwilv+a9OiL3vHE820NYSYAY9PHi0k01HuadfORmHCTfYStZEdctP5Z5 V86TLKGzfp+ewRiSRbynkRL86PLId8g5dvRs3jzGSb4YZbe7w7LpE/j8IM781KAtqQuGaQfFJX+KO grlhf3P65lysaprghveTzQ==; 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 1ovdgI-0003vf-Ts; Thu, 17 Nov 2022 07:07:47 -0500 Date: Thu, 17 Nov 2022 14:07:46 +0200 Message-Id: <8335aheqct.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Juanma Barranquero on Thu, 17 Nov 2022 10:28:44 +0100) References: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juanma Barranquero > Date: Thu, 17 Nov 2022 10:28:44 +0100 > > emacs -Q > M-x byte-compile-file ~/.emacs.d/init.el > C-x C-c > emacs > ;;; init.el is now native-compiled > C-h v user-init-file > ;;; => "d:/mypath/Home/.emacs.d/init.el" > C-x C-c > emacs > C-h v user-init-file > ;;; => "d:/mypath/Home/.emacs.d/native/29.0.50-a4a10996/init-7890dda9-d677a456.eln" After the last step, what does the below produce: M-: (gethash "init-7890dda9-d677a456.eln" comp-eln-to-el-h) RET From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Nov 2022 13:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 59334@debbugs.gnu.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166869187126708 (code B ref 59334); Thu, 17 Nov 2022 13:32:01 +0000 Received: (at 59334) by debbugs.gnu.org; 17 Nov 2022 13:31:11 +0000 Received: from localhost ([127.0.0.1]:59543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovez1-0006wi-7B for submit@debbugs.gnu.org; Thu, 17 Nov 2022 08:31:11 -0500 Received: from mail-ed1-f46.google.com ([209.85.208.46]:38577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oveyz-0006wV-Da for 59334@debbugs.gnu.org; Thu, 17 Nov 2022 08:31:09 -0500 Received: by mail-ed1-f46.google.com with SMTP id s12so2531055edd.5 for <59334@debbugs.gnu.org>; Thu, 17 Nov 2022 05:31:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=7eOPjydpoH6fxqdn9W/CIYPHBDGsK/Es2G30QDkWXlY=; b=X1FHAh0bw0+PIYMV32zns1NfDG9152kzIobyy63eU80iFzdLpodXW1HXxstY6Q1pm3 9OrCAp8RB9nFkyIhfUUd7EURSrka19+PkOjzTotR2BULlHEQYhJWGlMZroJDDYlDwU7U B9lTuQn8DfSBl5D2yddNLFqnLEUdUr55VxpxmxfxeGQKHwX7oPBQ6RfR47Dx0HdnCnSZ Zht7gPBdTAALKo31XXlcZgVKihDZywRRbtvvORwd2yOWq4anckHaVrALLTGixS/wvSkV vVkAf1/fmeD9oXx+Z+/LCnnUmunyEkXMtzPCG04r5hfrBxOmqbe9mmJZ2EKslxsVHqTx SxHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7eOPjydpoH6fxqdn9W/CIYPHBDGsK/Es2G30QDkWXlY=; b=t+PRkDh/pWlKZ7RW3s08+9WU7p5QzkRXxu0uG74DUZ/X4yS5DabRzhB8kyH8CmFtee brAJxGwiF8pUAYepQVWnwRO/svx7QQGxVWFg2y6HYUYkg+910XqAsvQ/d2+4BODEnrLn gy7di5PKOCrEwplOjbSBdIph9d/9JbX36IlfIUSL6czGeNADUMAOKhkJe4S/dMVzqBG1 kbeCUUX9qoe/0DCl5S/KixZYOwlLeK8yxagPFNZFOXxuDOaFnRY0yitrxMWz4p0G8si6 roDAA/SJn1t11kKlFc9cbhDFFx+DA8jP1hD9hBfPmcIw7nKIlXvDMu7JGfuaQql0PsmF u/AQ== X-Gm-Message-State: ANoB5pmoMIoz7xi0zFjLR6hJTZNv/+XKyMcDKqkbVT9jCXEeT42wybTO O0U25s5aqG+oT9jdRoHb6lvGBuWULSxvDlEL8zo= X-Google-Smtp-Source: AA0mqf6r8wm0iULoA2hu3sy/7k2kACnMnIDi0+4gYmoE7zKQBS6XbiETM5ECUt9w1py6Gf8xjEj1P0frnKhTDMvDDqU= X-Received: by 2002:a05:6402:f01:b0:459:9dd3:2217 with SMTP id i1-20020a0564020f0100b004599dd32217mr2139635eda.163.1668691863406; Thu, 17 Nov 2022 05:31:03 -0800 (PST) MIME-Version: 1.0 References: <8335aheqct.fsf@gnu.org> In-Reply-To: <8335aheqct.fsf@gnu.org> From: Juanma Barranquero Date: Thu, 17 Nov 2022 14:30:27 +0100 Message-ID: Content-Type: multipart/alternative; boundary="000000000000c20bde05edaa995b" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000c20bde05edaa995b Content-Type: text/plain; charset="UTF-8" M-: (gethash "init-7890dda9-d677a456.eln" comp-eln-to-el-h) RET => "d:/mypath/Home/.emacs.d/init.el" --000000000000c20bde05edaa995b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
M-: (getha= sh "init-7890dda9-d677a456.eln" comp-eln-to-el-h) RET
<= br>=3D> "d:/mypath/Home/.emacs.d/init.el"
--000000000000c20bde05edaa995b-- From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln 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 X-GNU-PR-Keywords: To: Juanma Barranquero , Andrea Corallo Cc: 59334@debbugs.gnu.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166869362329559 (code B ref 59334); Thu, 17 Nov 2022 14:01:02 +0000 Received: (at 59334) by debbugs.gnu.org; 17 Nov 2022 14:00:23 +0000 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 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 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==; 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 Date: Thu, 17 Nov 2022 16:00:11 +0200 Message-Id: <83wn7td6l0.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Juanma Barranquero on Thu, 17 Nov 2022 14:30:27 +0100) References: <8335aheqct.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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? From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Nov 2022 20:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Juanma Barranquero , 59334@debbugs.gnu.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166871549610980 (code B ref 59334); Thu, 17 Nov 2022 20:05:02 +0000 Received: (at 59334) by debbugs.gnu.org; 17 Nov 2022 20:04:56 +0000 Received: from localhost ([127.0.0.1]:34460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovl84-0002r2-2Y for submit@debbugs.gnu.org; Thu, 17 Nov 2022 15:04:56 -0500 Received: from mx.sdf.org ([205.166.94.24]:58006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovl80-0002qq-DB for 59334@debbugs.gnu.org; Thu, 17 Nov 2022 15:04:54 -0500 Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 2AHK4n2l014281 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 17 Nov 2022 20:04:49 GMT From: Andrea Corallo In-Reply-To: <83wn7td6l0.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 17 Nov 2022 16:00:11 +0200") References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> Date: Thu, 17 Nov 2022 20:04:42 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> 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? Hi Eli, yes, I'd have suggested the same. Andrea From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Nov 2022 20:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Andrea Corallo Cc: lekktu@gmail.com, 59334@debbugs.gnu.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166871575511484 (code B ref 59334); Thu, 17 Nov 2022 20:10:02 +0000 Received: (at 59334) by debbugs.gnu.org; 17 Nov 2022 20:09:15 +0000 Received: from localhost ([127.0.0.1]:34485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovlCF-0002z9-5W for submit@debbugs.gnu.org; Thu, 17 Nov 2022 15:09:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovlCD-0002yx-7l for 59334@debbugs.gnu.org; Thu, 17 Nov 2022 15:09:13 -0500 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 1ovlC7-0003NC-VH; Thu, 17 Nov 2022 15:09:08 -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=3MyoMgnm5+JjAlx/C1rFltC6c1caGbwQDmlBYq0dNOg=; b=rBTAmxf86+WF MpPJJMPJOqY+S4oBaVHPxxM+VYJTbFkilo2U2OtS8Mxv9QQMHspkkw48mR+fHNClCtVVmsXtbd3yq 6QGU6HA9PSFZiPWkGKybOy9TLWEH3CjlUDGd7OD5+YAnM1vfxCooKTUITgcPHevvijbbJbkaT9HXS Pm6LfB/rIGeiStrzY/VE9GqVlK2R5tlvyTVOGy0+6tunV4bH8cZbkzJXdRCpxqZU00xgClBtndn5R TWXxZKEmqgkE97lE5pACAWR7uo5Nw035crjV4DriSWr6F4fYYaCDU/MI9Xch7qh+m7co+TusS6qIi afcNEdxXqFfPSW7lpEQYYw==; 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 1ovlC7-0001ow-Eq; Thu, 17 Nov 2022 15:09:07 -0500 Date: Thu, 17 Nov 2022 22:09:09 +0200 Message-Id: <83fsehcpi2.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Andrea Corallo on Thu, 17 Nov 2022 20:04:42 +0000) References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Andrea Corallo > Cc: Juanma Barranquero , 59334@debbugs.gnu.org > Date: Thu, 17 Nov 2022 20:04:42 +0000 > > Eli Zaretskii writes: > > > Andrea, do you agree with this solution? > > Hi Eli, > > yes, I'd have suggested the same. Great, thanks. From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 02:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 59334@debbugs.gnu.org, Andrea Corallo Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166873837915941 (code B ref 59334); Fri, 18 Nov 2022 02:27:01 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 02:26:19 +0000 Received: from localhost ([127.0.0.1]:34790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovr59-000493-2g for submit@debbugs.gnu.org; Thu, 17 Nov 2022 21:26:19 -0500 Received: from mail-ej1-f53.google.com ([209.85.218.53]:38405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovr56-00048o-75 for 59334@debbugs.gnu.org; Thu, 17 Nov 2022 21:26:17 -0500 Received: by mail-ej1-f53.google.com with SMTP id f18so9753958ejz.5 for <59334@debbugs.gnu.org>; Thu, 17 Nov 2022 18:26:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=afuWuZ6mjHKOwFd7QFpDhXsldNNo1udhudaLC1IPrbw=; b=laj3mllzvg+lCDXm1RTf7LkxqFT6EpeYToet74E3rUByAyRdgozHRbHwQI2l0UpWWU Ru4NyFDa6aozYehl/OlngjQxEiKSWkJmoIC/hgjVuZ9wFcqBI6jacwMHwxohclNVym96 KrdtHEMM/+VEryA66W9A0m4/0/LLRHfzrSCnAZFo070G8+u/jnRHINjUkzkb/zIF6NSz cSTP+JttYdowYf2PaQWnZILvda5mptcIK9RKx4tQoqX2ebBy8wXAnvuoaZOWy5lZxzM5 /27ECBqfsuqNGX5zeLTkU2Y983UyrK2FPUQx44ZnnsJsjX1Tvx516mxO1+DpEm/1y0Sz 0lhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=afuWuZ6mjHKOwFd7QFpDhXsldNNo1udhudaLC1IPrbw=; b=z23gEwwTD8jFH6t3QU7v/zHYn2JWpmU4gO4OMMnwj71oBoEKgIaO28tUfKQgOUqXiy oZoNE6YKnTU3LUH2nNr9kTig2Rfx/4vd1QqTki/J4CzqhHVtM5LURp006Q2D4KLzJ5V5 jWWXw6DhbDJvM0kV7GljSNam7lrFziDzs5Hhj8nCVBU+QXEaBLd6ZR9YoeUxPz2bb0xp Zhb/TKV4Zv357HXh7Mwt6y5ljn3+c6RSJtbQJZngNb/V6GtWPCKZaeVWBUmEgKhenLZR 8bvEI51pDm5EveZyXFh/Kshqw2xfwHqz5z0e1KtmPwIQ9rOA8EpkgzFh2EdQe/S2cfdt 1Prw== X-Gm-Message-State: ANoB5plY/p6/hoSgUXzjmPLeMAvithjvnEwWH4QtCTfMJx1XnAyYF4yL 8cg18JjdgwnL59yQAV9iIEhRH1hjkTefwuLw4AY= X-Google-Smtp-Source: AA0mqf69DtylO81txq+pFK8e7geRqazWaoPKq+BqW1ydxpBKjDeqcJeQL2akLQ96mrPKeD/IfF1StEMnaSzAfl5jLBM= X-Received: by 2002:a17:907:c24a:b0:7ac:2e16:bc31 with SMTP id tj10-20020a170907c24a00b007ac2e16bc31mr4249773ejc.242.1668738370253; Thu, 17 Nov 2022 18:26:10 -0800 (PST) MIME-Version: 1.0 References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> In-Reply-To: <83fsehcpi2.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 18 Nov 2022 03:25:34 +0100 Message-ID: Content-Type: multipart/alternative; boundary="000000000000c837b105edb56dbc" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000c837b105edb56dbc Content-Type: text/plain; charset="UTF-8" This fix works. It assumes (as the original code does) that the source will either be an .el file, or extensionless (though when an .eln was loaded, the source will always be .el), so the following code will check for staleness of the .elc as usual. In other words, with this patch, it will still warn if the source file is newer than the .elc (as it does now Emacs), regardless of whether the init file was loaded from an .elc or .eln. (The age of the .eln is irrelevant here, that's for the native compiler to check and act upon.) diff --git i/lisp/startup.el w/lisp/startup.el index 70267fc857..62984426e5 100644 --- i/lisp/startup.el +++ w/lisp/startup.el @@ -1064,7 +1064,11 @@ startup--load-user-init-file ;; 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)) + (when (member (file-name-extension user-init-file) + '("elc" "eln")) + (let* ((source (file-name-sans-extension + (or (gethash + (file-name-nondirectory user-init-file) + comp-eln-to-el-h) + user-init-file))) (alt (concat source ".el"))) (setq source (cond ((file-exists-p alt) alt) Testing this patch allowed me to discover another bug: If you use ~/.emacs instead of ~.emacs.d/init.el, and happen to compile .emacs, Emacs loads .emacs.elc (as it has always done), but the native compiler does *not* know how to compile it (because it does not know how to locate its source), so it gives a warning: 022-11-18 02:54:01+0100 Warning (comp): Cannot look up eln file as no source file was found for d:/Home/.emacs.elc and then it assigns the user-init-file to warnings.el! ELISP> user-init-file "d:/Home/.emacs.d/native/29.0.50-a4a10996/warnings-28e75f4d-02da775e.eln" which, if my patch is installed, gets converted to its source file: ELISP> user-init-file "d:/Devel/emacs/repo/trunk/lisp/emacs-lisp/warnings.el" So this is a double bug for anyone compiling their .emacs: they will always get a warning, and an erroneous user-init-file. Do you want me to file this as a separate bug? --000000000000c837b105edb56dbc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This fix works. It= assumes (as the original code does) that the source will either be an .el = file, or extensionless (though when an .eln was loaded, the source will alw= ays be .el), so the following code will check for staleness of the .elc as = usual.

In other words, with this patch, it will still warn if the so= urce file is newer than the .elc (as it does now Emacs), regardless of whet= her the=C2=A0init file was loaded from an .elc or .eln. (The age of the .el= n is irrelevant here, that's for the native compiler to check and act= =C2=A0upon.)


diff --git i/lisp/startup.el w/lisp/startup.el
index= 70267fc857..62984426e5 100644
--- i/lisp/startup.el
+++ w/lisp/start= up.el
@@ -1064,7 +1064,11 @@ startup--load-user-init-file
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; If we loaded a compiled file, set = `user-init-file' to
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= ;; the source version if that exists.
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(when (equal (file-name-extension user-init-file)
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &= quot;elc")
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* = ((source (file-name-sans-extension user-init-file))
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(when (member (file-name-extension user-init-file)<= br>+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0'("elc" "eln"))
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((source (file-name-sans-extens= ion
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(or (gethash
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 (file-name-nondirectory user-init-file)
+ = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 comp-eln-to-el-h)
+ =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0user-init-file)))
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (alt (concat= source ".el")))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(setq source (cond ((file-exists-p alt) alt)


Testing this patch allow= ed me to discover another bug:

If you use ~/.emacs instead of ~.emacs.d/init.el, and happen to c= ompile .emacs, Emacs loads .emacs.elc (as it has always done), but the nati= ve compiler does *not* know how to compile it (because it does not know how= to locate its source), so it gives a warning:

022-11-18 02:54:01+0100 Warning (comp): Cannot look up eln file = as no source file was found for d:/Home/.emacs.elc

and then i= t assigns the user-init-file to warnings.el!

ELISP> user-init-file
"d:/Home/.emacs.d/native/29.0.50-a4a1099= 6/warnings-28e75f4d-02da775e.eln"


which, if my patch is = installed, gets converted to its source file:

ELISP> user-init-file
"d:/Devel/emacs/repo/trunk/lisp/emacs-l= isp/warnings.el"

So this is a double bug for anyone comp= iling their .emacs: they will always get a warning, and an erroneous user-i= nit-file.

Do you want me to file this as a separate bug?
--000000000000c837b105edb56dbc-- From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 02:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 59334@debbugs.gnu.org, Andrea Corallo Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166874021918820 (code B ref 59334); Fri, 18 Nov 2022 02:57:02 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 02:56:59 +0000 Received: from localhost ([127.0.0.1]:34818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovrYp-0004tU-2t for submit@debbugs.gnu.org; Thu, 17 Nov 2022 21:56:59 -0500 Received: from mail-ed1-f54.google.com ([209.85.208.54]:42627) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovrYk-0004tE-Mf for 59334@debbugs.gnu.org; Thu, 17 Nov 2022 21:56:58 -0500 Received: by mail-ed1-f54.google.com with SMTP id z18so5319432edb.9 for <59334@debbugs.gnu.org>; Thu, 17 Nov 2022 18:56:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Num4oPTb+b230w9iefXfcnsEA7fxD96Dfm1QJm03nbU=; b=hWGPGpG3wUtWnkfSD+tlfExD5qVsJ87OwauDwsCXSOTCAHEk4PcGaxEF0zxe9q5w56 XSE3cNcl6SOsau6Pm+PXnq/1WFpHDQpRKJb3DEZIbZ+RYl4GRBPTNHlDjmQmdHw6LYqs /M1RUhZG9xQynbtlwF1uiRnO70Thq2TbMBZ7EqAlvmyICd2RjqYOWgFRvz1K5er4vNqH jfEjsOdbYM6mgLbVM1qLZCXJLZnvGAxFurMhVd5mRfBHpfo3z5urwCCHArQhOdgXG9sD aZOJgTM1stmG4yxqj2bWe1OChjqjTvJC8RPF4FdlYWQ/8ztGRQhp1oypkNICeKOg3Vni tdOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Num4oPTb+b230w9iefXfcnsEA7fxD96Dfm1QJm03nbU=; b=YBHY8OtdF3oruH3PwNswby+IiK75thXUoOLWALZsTCtPArzguS9S60NPQOpYm447Mv /cZ0Rxemmfsmt+9gizt/eJ6SGO1nmPhAKYmVVFVMNCMzjyM2fz8QGdebOsOBwreyOJzP tnGfsXNOC3LQNmuUL4+Uwwmr1VqKcaM8STvKEIjNrTjMzyyDFjqINFNLFdaVPIJkInfz SPc+6X50FJObTFjikHC5zPyyMiK9SgKvadGt4+quW8aAHB0/eP4/kJanyTfXR1CW74k/ 0RU2Vg/Hz3os2zELXkKGFJREbhUNynta4CgMihVUI3L4BLDsNbcva+cNeaWma4Uz1F5M lf3g== X-Gm-Message-State: ANoB5plOSK9yOjaYRjimwg00vymuS+IL/S1Kp0fKmnJQ45XjlW5Otl9r 9UOjnL4sGMc5ABu1WN3GcdrcIjYtRFxI4r/SXvk= X-Google-Smtp-Source: AA0mqf7qHdMrI1rhYBA0ypdzYsXV5fBvCTpG5i7dGtLOwBClB4hM/cRU/OAYHJCNvQMuTKA1J7i6PeHTnMbkEZnkckk= X-Received: by 2002:a05:6402:444c:b0:462:2e27:3bf2 with SMTP id o12-20020a056402444c00b004622e273bf2mr4538538edb.13.1668740208524; Thu, 17 Nov 2022 18:56:48 -0800 (PST) MIME-Version: 1.0 References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> In-Reply-To: From: Juanma Barranquero Date: Fri, 18 Nov 2022 03:56:12 +0100 Message-ID: Content-Type: multipart/alternative; boundary="0000000000005a053105edb5dbba" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000005a053105edb5dbba Content-Type: text/plain; charset="UTF-8" On Fri, Nov 18, 2022 at 3:25 AM Juanma Barranquero wrote: > In other words, with this patch, it will still warn if the source file is newer than the .elc > (as it does now Emacs), regardless of whether the init file was loaded from an .elc or > .eln. (The age of the .eln is irrelevant here, that's for the native compiler to check and > act upon.) Sorry, this part is not true. It's comparing the source with user-init-file. Let me fix that and get back. --0000000000005a053105edb5dbba Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


<= div dir=3D"ltr" class=3D"gmail_attr">On Fri, Nov 18, 2022 at 3:25 AM Juanma= Barranquero <lekktu@gmail.com&g= t; wrote:
=C2=A0
> In other words, with this patch,= it will still warn if the source file is newer than the .elc
> (as it does now Emacs), regardless of whether the = init file was loaded from an .elc or
> = .eln. (The age of the .eln is irrelevant here, that's for the native co= mpiler to check and
> act upon.)
Sorry,= this part is not true. It's comparing the source with user-init-file. = Let me fix that and get back.

--0000000000005a053105edb5dbba-- From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 03:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 59334@debbugs.gnu.org, Andrea Corallo Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166874065719638 (code B ref 59334); Fri, 18 Nov 2022 03:05:01 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 03:04:17 +0000 Received: from localhost ([127.0.0.1]:34831 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovrft-00056g-9F for submit@debbugs.gnu.org; Thu, 17 Nov 2022 22:04:17 -0500 Received: from mail-ej1-f48.google.com ([209.85.218.48]:39443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovrfq-00056S-OG for 59334@debbugs.gnu.org; Thu, 17 Nov 2022 22:04:16 -0500 Received: by mail-ej1-f48.google.com with SMTP id i10so9889706ejg.6 for <59334@debbugs.gnu.org>; Thu, 17 Nov 2022 19:04:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4FAM08Go6cJue+bhp32YfsYQjchsn5ncRnl/th3/KPY=; b=INRtnBhcveROcqvjNI+Ywdfkuasirq93t4RsQgfmGZUSIw3fUT8kKztDAD8XYUzKFA 6+nQWDz5KBWTKzzQcQddDtdiU5eSxSSkEHIr7X4jDGgC5hQC5Vjp1C+tBmCa1+vz+WY/ B+0nOVx+/h6XIuPjUlDGjBpbTBdW4ludQEbLzCLK5h1z6gsiyphP2vmnQXzjUuP91KLR PzCV556WEwGsA4DiKxYokrudaOfbSuPLbdEgF73W7PyKOTWgRce+9J99NBzbhncARCBs geAQIVwoPC+B+uykd4s7dyYd80TAZYsx/tVotlP2upgbj0vkg65TB8BtIQUxww4D5nUm pWjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4FAM08Go6cJue+bhp32YfsYQjchsn5ncRnl/th3/KPY=; b=PDuprQEBoowj57oPocfFVyUPp6M0yEkAK8Z9bDqmJ+YGp9RBh4FHeUDxVD2bbypV+l eKJ5cZj6ZOfE82VZNSQPPA6ibsi4cAvFQHMc9pIEm5/PGWDkPtlOMf1Vy4/0dBbfESqz iAtERhAgqcP3kepGSHm4TNH1noh3gXM2JFncvMwcYRpgEvhc9oRaZr306Sa9Kbl8anwl PCsp3xCimhQBvalzUV8rxc/GeQv4qRrQYTt6baPs/e/g/golH/JORDRLEUVF/dk346Fv bKVjj/z/Lh1QFOcIP2RvXCFEa7P+VrWEUP5BV21jbjLfNabiQEbK5J77YmHwEjC80E+B tkGw== X-Gm-Message-State: ANoB5pmM38zgfPlKoW0/ap14HwBSoAPKVGhMLK/lUZzDiPP/D/uDC5gJ N/gdiuh9fY9QkPKs96WHB4rq/AGKArA1HrjBSQA= X-Google-Smtp-Source: AA0mqf6NLikk8BGzGuk9krtcTkD7UfUIY+K8vRZyFp9kAbNW9stgRcMjN1tERUrR8INWN5sdT2VpdyMhM/Fv3bI0SA0= X-Received: by 2002:a17:906:7ca:b0:78d:95d8:f8db with SMTP id m10-20020a17090607ca00b0078d95d8f8dbmr4151700ejc.592.1668740648854; Thu, 17 Nov 2022 19:04:08 -0800 (PST) MIME-Version: 1.0 References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> In-Reply-To: From: Juanma Barranquero Date: Fri, 18 Nov 2022 04:03:32 +0100 Message-ID: Content-Type: multipart/alternative; boundary="00000000000098eb3905edb5f539" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000098eb3905edb5f539 Content-Type: text/plain; charset="UTF-8" Hmm. Before I start changing it... If the init file was loaded from .eln, do we want it to warn the user - when init.el is newer than init.elc, or - when init.el is newer than [whatever]/init-xxxxxxxx-yyyyyyy.eln (as it's doing now)? --00000000000098eb3905edb5f539 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hmm. Before I start changing it...

If the init file was lo= aded from .eln, do we want it to warn the user
- when init.el is newer t= han init.elc, or
- when init.el is newer than [whatever]/init-xxxxxxxx-y= yyyyyy.eln (as it's doing now)?

--00000000000098eb3905edb5f539-- From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 07:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: 59334@debbugs.gnu.org, akrl@sdf.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166875594613850 (code B ref 59334); Fri, 18 Nov 2022 07:20:02 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 07:19:06 +0000 Received: from localhost ([127.0.0.1]:35096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovveT-0003bK-Mj for submit@debbugs.gnu.org; Fri, 18 Nov 2022 02:19:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovveR-0003ap-0o for 59334@debbugs.gnu.org; Fri, 18 Nov 2022 02:19:03 -0500 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 1ovveL-0004I2-Of; Fri, 18 Nov 2022 02:18:57 -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=doVbu52NLj5a4fkR4OlMvXbhIS9HoRzAsguURx8VlzA=; b=X6xpAOeebPQC HmYEtVrjTCyOf76ItWBTKW7QWmLUzBs2YSzL22rS9KAzvbhGa0h02cv6ERS8dB8/+v6ouf7OUkX4k TJ/WOHfOBvXpnH3JgANyj2hqcCn9JPW6xCbuth5UF8gqrbCsEEso7M7grJaCP16MesLYrv3Yy389d +IfXuMlBpKFDv2zMwQ9n9mStAWRbMsMhVfcdF6ppKgaJUAWob5omXQJz12hyvSplwoITTfpa9SqC8 64fZwQL7TWhtBelO6WVOsj5D/hFbux6oawhGbaacej2cnXE7n7dg4wbPHkk5muGaylTcl3/Joc1kr Fs3iW0RGcdRXgxz+OJLO3A==; 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 1ovveL-00033V-7C; Fri, 18 Nov 2022 02:18:57 -0500 Date: Fri, 18 Nov 2022 09:19:00 +0200 Message-Id: <83bkp4d923.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Juanma Barranquero on Fri, 18 Nov 2022 03:25:34 +0100) References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juanma Barranquero > Date: Fri, 18 Nov 2022 03:25:34 +0100 > Cc: Andrea Corallo , 59334@debbugs.gnu.org > > If you use ~/.emacs instead of ~.emacs.d/init.el, and happen to compile .emacs, Emacs loads .emacs.elc > (as it has always done), but the native compiler does *not* know how to compile it (because it does not know > how to locate its source), so it gives a warning: > > 022-11-18 02:54:01+0100 Warning (comp): Cannot look up eln file as no source file was found for > d:/Home/.emacs.elc > > and then it assigns the user-init-file to warnings.el! > > ELISP> user-init-file > "d:/Home/.emacs.d/native/29.0.50-a4a10996/warnings-28e75f4d-02da775e.eln" > > which, if my patch is installed, gets converted to its source file: > > ELISP> user-init-file > "d:/Devel/emacs/repo/trunk/lisp/emacs-lisp/warnings.el" > > So this is a double bug for anyone compiling their .emacs: they will always get a warning, and an erroneous > user-init-file. > > Do you want me to file this as a separate bug? Yes, please. From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 07:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: 59334@debbugs.gnu.org, akrl@sdf.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166875649714775 (code B ref 59334); Fri, 18 Nov 2022 07:29:01 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 07:28:17 +0000 Received: from localhost ([127.0.0.1]:35114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovvnM-0003qE-Nh for submit@debbugs.gnu.org; Fri, 18 Nov 2022 02:28:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovvnH-0003ps-Tu for 59334@debbugs.gnu.org; Fri, 18 Nov 2022 02:28:15 -0500 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 1ovvn7-0005qB-7f; Fri, 18 Nov 2022 02:28: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=UC2kby4wCOUpzeSQT9tuGSFcx322LAHZAkq6n55HEYE=; b=S+hPDXWrwx8R 2fsAYNHTTCWDf2qWEbHvEzC06v925/uDg29Vbhfq3HjK83PqVwN2B4SaehbewH7zB25M6iSPYLP8I n6qyi4gbuZoN0qHBF1PwT9wNRJUkIdwIOvC3YDb0WakQl154+icyL7gYwnq4sX+JlmETDUggCOffT ux80uoqRlshClOYt4fL+It8UoNcUrZNG4/CT+thg4fLsUdBmRKOD4Wv6Xrbve79KxU/tgBOrn1w6H aAM6C7cOXhQAiceKjsXAR9KZV3XEvlo9bOAcfnfG2OyzNFDSBEmPD0ijF4YOcDaohzASXfxOqyN4q yoZxcuMdxY/1tOGLk2K7+A==; 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 1ovvn2-0006TF-8G; Fri, 18 Nov 2022 02:28:00 -0500 Date: Fri, 18 Nov 2022 09:27:52 +0200 Message-Id: <83a64od8nb.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Juanma Barranquero on Fri, 18 Nov 2022 03:25:34 +0100) References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juanma Barranquero > Date: Fri, 18 Nov 2022 03:25:34 +0100 > Cc: Andrea Corallo , 59334@debbugs.gnu.org > > diff --git i/lisp/startup.el w/lisp/startup.el > index 70267fc857..62984426e5 100644 > --- i/lisp/startup.el > +++ w/lisp/startup.el > @@ -1064,7 +1064,11 @@ startup--load-user-init-file > ;; 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)) > + (when (member (file-name-extension user-init-file) > + '("elc" "eln")) > + (let* ((source (file-name-sans-extension > + (or (gethash > + (file-name-nondirectory user-init-file) > + comp-eln-to-el-h) > + user-init-file))) > (alt (concat source ".el"))) > (setq source (cond ((file-exists-p alt) alt) I think the call to gethash should only be done if the file has the .eln extension, otherwise you might have false positives. The logic should be something like . if the extension is .eln then - try to get the corresponding .el file by gethash - if that fails, leave user-init-file to be the original .eln file name, perhaps with a warning - otherwise, set user-init-file to the .el file from gethash . else The file-exists-and-is-newer test is not relevant to the .eln case, because Emacs will not load a .eln file that is outdated wrt its source, and will not use a .eln file whose source is not available. Andrea, please correct me if I'm wrong. From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 07:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 59334@debbugs.gnu.org, akrl@sdf.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166875754816637 (code B ref 59334); Fri, 18 Nov 2022 07:46:01 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 07:45:48 +0000 Received: from localhost ([127.0.0.1]:35145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovw4K-0004KH-2u for submit@debbugs.gnu.org; Fri, 18 Nov 2022 02:45:48 -0500 Received: from mail-ej1-f53.google.com ([209.85.218.53]:35797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovw4H-0004K1-86 for 59334@debbugs.gnu.org; Fri, 18 Nov 2022 02:45:46 -0500 Received: by mail-ej1-f53.google.com with SMTP id vv4so1727139ejc.2 for <59334@debbugs.gnu.org>; Thu, 17 Nov 2022 23:45:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=V+SPiYmFKEi+YkaLb+1tu2wVnWPRoZTlSS+W0ahi0Ek=; b=dR1dxITGV5v43SSJCxMihqMdnn2p7EK0bO0R9VExIr8ZcjXHAtU5ECrYbAkAvzhSCL Yp6pmQhg8hwOzGiNgpz4zXMNQEAzfwphCd1tKrwAQmUZMs1Sv9CHhbO7UC0MxFS+F2y6 Hk/aBVXzk2RRio5GAAjZ1hb7jw3tpxc44XzxKcZaR/ggI65JhF0lrmRAYIHYtZ8rXAb6 0SZrAG2xIiToYtCIC1Cwx232Rd9sfHuYmm65LkFxju659UHr2VPY4zgtGuBPuU/5nfzK 2zulecQ+Fw0rYM+mmf4EAwXVO3e/sloz8HaaWHeVKZeMvdwvVTu81S+xvjt8gN3wLPS3 B8sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=V+SPiYmFKEi+YkaLb+1tu2wVnWPRoZTlSS+W0ahi0Ek=; b=DlOLr2ksJUN9qPT3Zod3vEpx8oSgY9gfqBoPM7w043bdTJEWqkOS2erGIRWyFfqt/m ifOHRORFnrjfIiKHo8nBrzlIR9fXeWDqC3ExIQIIcJGkFViLFHSwda8rffrfEpTY+qKb oT7gNioGP/fKxOoJ48rK6w0vS1fxXeVQSB8geIMj5+iM5nj89md3Q/zqiYGyx5MsFXjz hvLgH1PIwlOPogZYrSeT9dS/r+YrZhiPkEyBEqoKbLxZWTzkNMhrH6pFbnFAgVfDG5xr 88i/Vs2VPU2pW/FxbG6kKAcrAnnc7CdiatMAGE7HUGB/OtJbIWkJM6w/aCROSwHSgnhn b+fQ== X-Gm-Message-State: ANoB5plqaZuhdPCvkh3b8XEZBu4VNqQSjk8uupbYhG1CK+s1lkUYQN0k UIEYTFAnbWTlRVIJpCNCQH2nES8CZS0I002uCpw= X-Google-Smtp-Source: AA0mqf6GRD+Dq2CSj0PoyNLrGZwlXmFwcEgcUmhp1ZR4ovl2P83mHoen86pz+5hj1EWv6ugevaE+3Kkb1azdSOlHHBM= X-Received: by 2002:a17:906:7ca:b0:78d:95d8:f8db with SMTP id m10-20020a17090607ca00b0078d95d8f8dbmr4740996ejc.592.1668757539054; Thu, 17 Nov 2022 23:45:39 -0800 (PST) MIME-Version: 1.0 References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> <83a64od8nb.fsf@gnu.org> In-Reply-To: <83a64od8nb.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 18 Nov 2022 08:45:03 +0100 Message-ID: Content-Type: multipart/alternative; boundary="00000000000054ef2205edb9e4af" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000054ef2205edb9e4af Content-Type: text/plain; charset="UTF-8" On Fri, Nov 18, 2022 at 8:28 AM Eli Zaretskii wrote: > I think the call to gethash should only be done if the file has the > .eln extension, otherwise you might have false positives. Do you mean the hash comp-eln-to-el-h could have keys that match something that doesn't end in .eln? Or that someone could've an init file with extension .eln and matching one of the keys? Both seem extremely unlikely, but ok. > The file-exists-and-is-newer test is not relevant to the .eln case, > because Emacs will not load a .eln file that is outdated wrt its > source, and will not use a .eln file whose source is not available. Ok. Easier, then. --00000000000054ef2205edb9e4af Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Fri, Nov 18, 2022 at 8:28 AM Eli Zaretskii <eliz@gnu.org> wrote:

> I think= the call to gethash should only be done if the file has the
> .eln e= xtension, otherwise you might have false positives.

Do you mean the hash co= mp-eln-to-el-h could have keys that match something that doesn't end in= .eln? Or that someone could've an init file with extension .eln and ma= tching one of the keys? Both seem extremely unlikely, but ok.

>= The file-exists-and-is-newer test is not relevant to the .eln case,
>= ; because Emacs will not load a .eln file that is outdated wrt its
> = source, and will not use a .eln file whose source is not available.

=
Ok. Eas= ier, then.

--00000000000054ef2205edb9e4af-- From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 07:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: 59334@debbugs.gnu.org, akrl@sdf.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166875784817315 (code B ref 59334); Fri, 18 Nov 2022 07:51:02 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 07:50:48 +0000 Received: from localhost ([127.0.0.1]:35166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovw9A-0004VC-8p for submit@debbugs.gnu.org; Fri, 18 Nov 2022 02:50:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60990) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovw98-0004Ut-64 for 59334@debbugs.gnu.org; Fri, 18 Nov 2022 02:50:46 -0500 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 1ovw92-000175-TD; Fri, 18 Nov 2022 02:50:40 -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=VNj4rle9ZcDAwqOdhwN0Rjb/z5yABn4nJ88+SU3kupQ=; b=SkXT3CtETOGL 7afcfUIurPSV6hyC25H6oS0VwpxRD0XhYsbDetMfDEr5jrOxNbPIyRouX3Rrd1NyCf3UKnVBiImgf qPuVju7Mku+kHznrw6I+KfodoCoudDgxrAES1Oa3KiOwG3xXwE0qPxTs1FlSic0ySi4wvdr7vE5s5 klGEtVruzJXLN9EipMwCJStkZ6/qXY/kEBMyXT9VFFYGP9ZdfyWE/+IGrQZObP5sVBl6LMvFNn4Yw IiMKn+JzfjwUalU2TCYVGkTNYL/98nawJ4cjHxERVkdMii7Rq/PgKQ9cqq7iNoN289IBELci9KU3I /Vp5bWpXcqmkRnMj35mpjg==; 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 1ovw92-0003J0-Bk; Fri, 18 Nov 2022 02:50:40 -0500 Date: Fri, 18 Nov 2022 09:50:44 +0200 Message-Id: <835yfcd7l7.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Juanma Barranquero on Fri, 18 Nov 2022 04:03:32 +0100) References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juanma Barranquero > Date: Fri, 18 Nov 2022 04:03:32 +0100 > Cc: Andrea Corallo , 59334@debbugs.gnu.org > > If the init file was loaded from .eln, do we want it to warn the user > - when init.el is newer than init.elc, or > - when init.el is newer than [whatever]/init-xxxxxxxx-yyyyyyy.eln (as it's doing now)? The second one cannot happen, AFAIU: Emacs will not load an outdated .eln file. That's why Emacs insists on having access to the .el source file when it is about to load a .eln file. As for the first one, I'm not sure if a warning is necessary. For starters, it will be a very rare one, since when we compile to produce an updated .eln file, we also produce an updated .elc file. And emitting a warning in that case might confuse users, making them think Emacs loaded the .elc file (otherwise why should Emacs bother about its being outdated?). So, on balance, I think the answer is NO to both. Andrea, WDYT? From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 08:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: 59334@debbugs.gnu.org, akrl@sdf.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166876117822990 (code B ref 59334); Fri, 18 Nov 2022 08:47:01 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 08:46:18 +0000 Received: from localhost ([127.0.0.1]:35229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovx0s-0005yi-Gl for submit@debbugs.gnu.org; Fri, 18 Nov 2022 03:46:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovx0q-0005yU-AY for 59334@debbugs.gnu.org; Fri, 18 Nov 2022 03:46:16 -0500 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 1ovx0a-0000np-W4; Fri, 18 Nov 2022 03:46:11 -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=VUwQ8TPx3IiY5qyaLooXPgpDwi+h3LmTMXFsPCjZoCI=; b=Xu4BsX2YtiJu C/r5/uEK1EzyVN7P/2Wdkzjr43WGhAhnLQsmNzKJeWoQg6ILc0WPABVe/APqpmP2QvHtwEwvgVDOj OL3WnzvS7cGB8Hqkn2FF6KR7SYw1XgNtrUOkUsRF7386/XCyamAQV0dfE16zQBvtbji1xMEbWeb8j bdG2ijaXBM0yHuYHLHrEBRpHFES+/S6O3ixqj2SyuatFxcsfylXewGXaUQ5Ajw2qRDTBrPAWXtKVF FCkzOx6D3X5HaFSP2QR1+LHeO46Q9u8+RJcbnLqY460O0IzAUMe5fz4FtKLvI06uSmMqE4fOK3Nay qFfSlJx8aTvzEJOkvImMXA==; 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 1ovx0a-00030o-Ev; Fri, 18 Nov 2022 03:46:00 -0500 Date: Fri, 18 Nov 2022 10:46:03 +0200 Message-Id: <83tu2wbqgk.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Juanma Barranquero on Fri, 18 Nov 2022 08:45:03 +0100) References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> <83a64od8nb.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juanma Barranquero > Date: Fri, 18 Nov 2022 08:45:03 +0100 > Cc: akrl@sdf.org, 59334@debbugs.gnu.org > > > I think the call to gethash should only be done if the file has the > > .eln extension, otherwise you might have false positives. > > Do you mean the hash comp-eln-to-el-h could have keys that match something that doesn't end in .eln? Or > that someone could've an init file with extension .eln and matching one of the keys? Both seem extremely > unlikely, but ok. I thought about a possibility that the session loaded a .eln file, but then the user or some Lisp explicitly loaded the .el file by hand. I'm not sure in this case the hash table is updated. Andrea, am I right? From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 09:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 59334@debbugs.gnu.org, akrl@sdf.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166876239725079 (code B ref 59334); Fri, 18 Nov 2022 09:07:01 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 09:06:37 +0000 Received: from localhost ([127.0.0.1]:35251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovxKX-0006WR-5X for submit@debbugs.gnu.org; Fri, 18 Nov 2022 04:06:37 -0500 Received: from mail-pl1-f170.google.com ([209.85.214.170]:39887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovxKU-0006WB-Fj for 59334@debbugs.gnu.org; Fri, 18 Nov 2022 04:06:36 -0500 Received: by mail-pl1-f170.google.com with SMTP id k7so4023928pll.6 for <59334@debbugs.gnu.org>; Fri, 18 Nov 2022 01:06:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5x/oR+OBzlym0JS5eMT4RVpEMLGRtAmJ9rA1cvjzZpI=; b=dbQRSPGCPw+Jl7uk+CYnz6aoBw8e6RsVJjvsvUzQkAu5jmu7UWykNucszNugZsM+AM j7Xy5Z5XlOvTQub5DQ+ooy+BW/e46d+kzWjRBDX6u4Q1JSR+ke+ot1rxHlclxA/WXbqC lkJOfxeqQ7HbRjmSzghVCK6x81r+ByAlaLRqb1V7mmaM4RCWK8u9dfhqtpqxq0TEj2wo OyZYnAJv+vA+enrULlGPAPe5SNVjZzMhAK1Nrdm5jwlEMJ0yRuoErfkrysZUF/eqLhnE i7RpWL4RMcYM+rBHhSdoOIhXXa+ol7Zn1LJ/1YQQfeDPRkT+CbKocfptOyiSCyDjSRiS qFBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=5x/oR+OBzlym0JS5eMT4RVpEMLGRtAmJ9rA1cvjzZpI=; b=PZ3K2RGU+U8iT8pXa/s9712dmhKUhzzj5dRGHZU/Sh/y2YPgq+ZAjqc6S8vI9Osz1F C34XnYpVQU+rn3AvG8nG2tp9fuZX2+GkXi9nOIhkaM0Sgg6wvS8PGhIE4gTpjkShpTIb 0lbxyurOBuG3md2pw/PNcPCGI39MYLirjTzlhnJLj82/bcHn5inNekHbhofj8TcUIExE 7mF5dbqZq5uzbUzgUEKLHnIzE8X8Kcaaft7A6XA7gqVwyhBy6QpRQgjLXzITBBgeHTch AAujt6HbzFslwjuda1H+vx4xtvQ7pCWnx/7/yna+iJsNHmmQJKoY7X8+kkYF14hi0o4k /tYQ== X-Gm-Message-State: ANoB5pmeFxww0UkycAyqz4u5dT5MYHplk2K4I2u7LH97BLTFv5gQSLv5 MOGgD38WqXqze7w5EJBwbDFqoL1rbe9mjA2fJvU= X-Google-Smtp-Source: AA0mqf6JUeCHMKqJb0Gv9st6xpeuACNtmqnq6IFxeB1ncqSCzno+vnSaKukup30amIPeJI2F7/7QG0j20pPUXMToYio= X-Received: by 2002:a17:902:f313:b0:188:5681:4dc8 with SMTP id c19-20020a170902f31300b0018856814dc8mr6659643ple.23.1668762388441; Fri, 18 Nov 2022 01:06:28 -0800 (PST) MIME-Version: 1.0 References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> <83a64od8nb.fsf@gnu.org> <83tu2wbqgk.fsf@gnu.org> In-Reply-To: <83tu2wbqgk.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 18 Nov 2022 10:05:50 +0100 Message-ID: Content-Type: multipart/alternative; boundary="00000000000060af2b05edbb052b" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000060af2b05edbb052b Content-Type: text/plain; charset="UTF-8" On Fri, Nov 18, 2022 at 9:46 AM Eli Zaretskii wrote: > I thought about a possibility that the session loaded a .eln file, but > then the user or some Lisp explicitly loaded the .el file by hand. > I'm not sure in this case the hash table is updated. That's a whole another problem, isn't it? On one hand, it would not affect user-init-file, as it's not the usual startup procedure. And, on the other hand, my patch sets user-init-file to the source .el, so after reloading that file it would still have the right value, wouldn't it? Anyway, here's the reworked patch. diff --git i/lisp/startup.el w/lisp/startup.el index 70267fc857..d7d8743336 100644 --- i/lisp/startup.el +++ w/lisp/startup.el @@ -1064,17 +1064,25 @@ startup--load-user-init-file ;; 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)))) + (if (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))) + ;; Else, perhaps the user init file was compiled + (when (equal (file-name-extension user-init-file) "eln") + (if-let (source (gethash (file-name-nondirectory user-init-file) + comp-eln-to-el-h)) + ;; source exists or the .eln file would not load + (setq user-init-file source) + (message "Warning: unknown source file for init file %S" + user-init-file) + (sit-for 1)))) (when (and load-defaults The original code is untouched, other than changing `when' to `if'; the else part deals with the .eln. I've checked that gethash returns a value, but not for the file's existence because in that case comp already complains: 2022-11-18 10:01:15+0100 Warning (comp): Cannot look up eln file as no source file was found for d:/Home/.emacs.d/init.elc The warning above is only for the unlikely case that user-init-file points to an .eln but the gethash lookup returns nil. --00000000000060af2b05edbb052b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


<= div dir=3D"ltr" class=3D"gmail_attr">On Fri, Nov 18, 2022 at 9:46 AM Eli Za= retskii <eliz@gnu.org> wrote:
=
=
>
I thought about a possibility that the session loaded a .el= n file, but
> then the user or some Lisp explicitly loaded the .el f= ile by hand.
> I'm not sure in this case the hash table is updat= ed.=C2=A0

That's a whole another problem, isn't it?

On o= ne hand, it would not affect user-init-file, as it's not the usual star= tup procedure.=C2=A0And, on the other=C2=A0hand, my patch sets user-init-fi= le to the source .el, so after reloading that file it would still have the = right value, wouldn't it?


diff --git i/lisp/startup.el w/lisp/startup.el
index 70267fc857..d7d8743336 100644
--- i/lisp/startup.el
+++ w/= lisp/startup.el
@@ -1064,17 +1064,25 @@ startup--load-user-init-file
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; If we loaded a compiled = file, set `user-init-file' to
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0;; the source version if that exists.
- =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(when (equal (file-name-extension user-init-file)
- = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 "elc")
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(let* ((source (file-name-sans-extension user-init-file))
- =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (alt (conca= t source ".el")))
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(setq source (cond ((file-exists-p alt) alt)
- =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((file-exists-p source) source)
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (t nil)))
- =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when source
- =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when (file-newer-than-file-p = source user-init-file)
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(message "Warning: %s is newer than %s"- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 source user-init-file)
- =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(sit-for 1))
- =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setq user-init-= file source))))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(if (equal (f= ile-name-extension user-init-file) "elc")
+ =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((source (file-name-sans-extens= ion user-init-file))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 (alt (concat source ".el")))
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setq source (co= nd ((file-exists-p alt) alt)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ((file-exists-p source) source)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 (t nil)))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(when source
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when (file-newer-than-file-p sour= ce user-init-file)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(message "Warning: %s is newer than %s"= ;
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 source user-init-file)
+ =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(sit-f= or 1))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(setq user-init-file source)))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0;; Else, perhaps the user init file was compiled
+ =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when (equal (file-name-extens= ion user-init-file) "eln")
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(if-let (source (gethash (file-name-nondirectory us= er-init-file)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 comp-eln-to-el-h))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; source exists or the .eln file would not = load
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(setq user-init-file source)
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(message "Warning: unknown source file for = init file %S"
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 user-init-file)
+ =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(sit-for 1))))
=C2= =A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when (and load-defa= ults


Th= e original code is untouched, other than changing `when' to `if'; t= he else part deals with the .eln.

I've checked that gethash retu= rns a value, but not for the file's existence because in that case comp= already complains:

2022-11-18 10:01= :15+0100 Warning (comp): Cannot look up eln file as no source file was foun= d for d:/Home/.emacs.d/init.elc
=
The warning above is only for the unlikely case that user-init-file poi= nts to an .eln but the gethash lookup returns nil.

--00000000000060af2b05edbb052b-- From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 09:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 59334@debbugs.gnu.org, akrl@sdf.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166876258025379 (code B ref 59334); Fri, 18 Nov 2022 09:10:02 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 09:09:40 +0000 Received: from localhost ([127.0.0.1]:35261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovxNU-0006bH-0S for submit@debbugs.gnu.org; Fri, 18 Nov 2022 04:09:40 -0500 Received: from mail-pg1-f174.google.com ([209.85.215.174]:45036) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovxNS-0006b2-7c for 59334@debbugs.gnu.org; Fri, 18 Nov 2022 04:09:38 -0500 Received: by mail-pg1-f174.google.com with SMTP id q1so4463346pgl.11 for <59334@debbugs.gnu.org>; Fri, 18 Nov 2022 01:09:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=gd8AJOg9V4XOauXW7ZIUfoyS0fyC05do/Mn40li+Q1g=; b=hyFDCxpr6b3pUXA/x0H4ATDKCgD5Djy7xR6RJqr5nKQ8gLiz5uSVM4lTifo3MZY7sC EUkOJeU9/tn+D0s2dX7AHCuPGgbrlxULzCpdNdiXzehlRd85ZrvAAVnGk3ZsL0P/XvUM juV6O8nzmiL/urvbIgV9KHM4i16EkTbU4/sa4JTXC7ilAt+UUaSw10Nv8lwzJeh8T7Fs YQ5c4SZ245NISFfyWHQ/GCZYTAe4L3C8T5Sa4HeOcslqIubY2vbRolApsLGXuuLRZgcW K+xbUGxzznOIzjLW7o/+JH/UvytnyDq+Bob4RHpxIP7EtYReVUcA5U1bESzu16WM0DFs ufBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gd8AJOg9V4XOauXW7ZIUfoyS0fyC05do/Mn40li+Q1g=; b=TSy2Zo4IzqRDy3a0RcqDAxmBg5r9q9HNpY8X+fRQx4tUn5zhv/aYX749gLqPzff4Y7 G3A+sRoOCY/Di2y5tsBI2YOnkK+ax2mxGgMIbsUh+DZYOOqUrXjYtwcHfyTPz+xEExTN 2kpIrcJCEnoB0gnPW+bGpGx1IVJtaPCLGL5Nc/ZiBzhsdgLcPEcu74gsuF3AIOM3monK ZXXsmMp19sGxzqe6bDRdaRtTKbU7VdAuJi02ZiDQKoYe9L8TuEqAeSQFy3Af2yOKMdSj 9dtg0xL/Vd//TVUhIQ9Gv5VLMh7D/Ukz+IJGJ6RXyCDzC1IZZIb+cTU238nwvJE3Rjch Z+0w== X-Gm-Message-State: ANoB5pn8MYwPkfcy472lezPuHSJ7pIR/53fqj+XYZE7yb0NhFYy+9CK8 VzI3EjmqCn2choBJVyc8KDbPrNrAGQHBd2Qrh34= X-Google-Smtp-Source: AA0mqf5Nd6jdW1qqoOHNt0lY/jUyYKFp0tcsk2fIjyANJQMLIynC0tahrHCjIjcoOLzpl1OyTqrczetqv1d7+SPCdcs= X-Received: by 2002:a63:4d01:0:b0:476:898c:deda with SMTP id a1-20020a634d01000000b00476898cdedamr5713441pgb.222.1668762572594; Fri, 18 Nov 2022 01:09:32 -0800 (PST) MIME-Version: 1.0 References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> <83a64od8nb.fsf@gnu.org> <83tu2wbqgk.fsf@gnu.org> In-Reply-To: From: Juanma Barranquero Date: Fri, 18 Nov 2022 10:08:54 +0100 Message-ID: Content-Type: multipart/alternative; boundary="0000000000005aa22005edbb1027" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --0000000000005aa22005edbb1027 Content-Type: text/plain; charset="UTF-8" On Fri, Nov 18, 2022 at 10:05 AM Juanma Barranquero wrote: > The warning above is only for the unlikely case that user-init-file points to an .eln > but the gethash lookup returns nil. Meaning the warning I've added in my code, not the warning I pasted about the missing .el, of course. --0000000000005aa22005edbb1027 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Fri, Nov 18, 2022 at 10:05 AM Juanma Ba= rranquero <lekktu@gmail.com> = wrote:

> The w= arning above is only for the unlikely case that user-init-file points to an= .eln
> but the gethash lookup return= s nil.

Meaning the warning I've added in my code, not the warning I pas= ted about the missing .el, of course.

--0000000000005aa22005edbb1027-- From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 10:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Juanma Barranquero , 59334@debbugs.gnu.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.16687679951726 (code B ref 59334); Fri, 18 Nov 2022 10:40:02 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 10:39:55 +0000 Received: from localhost ([127.0.0.1]:35365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovymo-0000Rl-MZ for submit@debbugs.gnu.org; Fri, 18 Nov 2022 05:39:54 -0500 Received: from mx.sdf.org ([205.166.94.24]:57136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovymk-0000RZ-8Z for 59334@debbugs.gnu.org; Fri, 18 Nov 2022 05:39:53 -0500 Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 2AIAdkGJ023240 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Fri, 18 Nov 2022 10:39:48 GMT From: Andrea Corallo In-Reply-To: <83tu2wbqgk.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Nov 2022 10:46:03 +0200") References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> <83a64od8nb.fsf@gnu.org> <83tu2wbqgk.fsf@gnu.org> Date: Fri, 18 Nov 2022 10:39:46 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Juanma Barranquero >> Date: Fri, 18 Nov 2022 08:45:03 +0100 >> Cc: akrl@sdf.org, 59334@debbugs.gnu.org >> >> > I think the call to gethash should only be done if the file has the >> > .eln extension, otherwise you might have false positives. >> >> Do you mean the hash comp-eln-to-el-h could have keys that match something that doesn't end in .eln? Or >> that someone could've an init file with extension .eln and matching one of the keys? Both seem extremely >> unlikely, but ok. > > I thought about a possibility that the session loaded a .eln file, but > then the user or some Lisp explicitly loaded the .el file by hand. > I'm not sure in this case the hash table is updated. In that case (manual load af an .el file) the hash table is just not updated (and still all the keys in it should be only .eln files). Andrea From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 12:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: 59334@debbugs.gnu.org, akrl@sdf.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166877481531527 (code B ref 59334); Fri, 18 Nov 2022 12:34:02 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 12:33:35 +0000 Received: from localhost ([127.0.0.1]:35629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow0Yp-0008CQ-CY for submit@debbugs.gnu.org; Fri, 18 Nov 2022 07:33:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow0Yo-0008CE-Cr for 59334@debbugs.gnu.org; Fri, 18 Nov 2022 07:33:34 -0500 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 1ow0Yi-0006oe-VZ; Fri, 18 Nov 2022 07:33:28 -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=xnwUaRrWAccNkqwf+pTWcTDVlAiHk7RWFaIUTWYcP4U=; b=BM/5Vp4++Gfp X1Lt7lxacvS5kKUApXVRqpVy9ASbkRQqTqxnHP8LhruwcG3t5g8RG0lgTSfiqKAO4NuufC0z5eEgg 4ODpRw2rjz/YQYwXxE/wc/jEZBgxR319T6xKjZwZG1Xmel8R+4FAF8xw8t/5TlDWe49AqnZUxM8lA cnBOBHJXX1ujgMeUP9o4N40VY/1nCiW7TGk4wyF/Ftcf27050GB5TR6ohI08M+tXrX7Qj+IV2Z87y zfJnPAbMShJZv6J1mkSfumzUNoMT9rqs14haSLVrBR9fgpYHqMup0sJWSALGpJYxxkLQVxynEjPKM 9oI0ykZT9ItI343kzP8f3A==; 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 1ow0Yh-0000Aj-58; Fri, 18 Nov 2022 07:33:28 -0500 Date: Fri, 18 Nov 2022 14:33:31 +0200 Message-Id: <83cz9kbfxg.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Juanma Barranquero on Fri, 18 Nov 2022 10:05:50 +0100) References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> <83a64od8nb.fsf@gnu.org> <83tu2wbqgk.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juanma Barranquero > Date: Fri, 18 Nov 2022 10:05:50 +0100 > Cc: akrl@sdf.org, 59334@debbugs.gnu.org > > > I thought about a possibility that the session loaded a .eln file, but > > then the user or some Lisp explicitly loaded the .el file by hand. > > I'm not sure in this case the hash table is updated. > > That's a whole another problem, isn't it? Not necessarily. > On one hand, it would not affect user-init-file, as it's not the > usual startup procedure. It could be part of startup if the forced loading of "init.el" is in the code inside user's init file itself. Crazy, I know, but not impossible. > And, on the other hand, > my patch sets user-init-file to the source .el, so after reloading that file it would still have the right value, > wouldn't it? If that is the same file, yes. But what if there's an init.el in another place? In any case, we don't need to keep arguing about this, since your pat6ch indeed uses gethash only if the init file has the .eln extension. > The original code is untouched, other than changing `when' to `if'; the else part deals with the .eln. I think we should compare the extensions case-insensitively, but other than that, this LGTM. Andrea, any comments? > I've checked that gethash returns a value, but not for the file's existence because in that case comp already > complains: > > 2022-11-18 10:01:15+0100 Warning (comp): Cannot look up eln file as no source file was found for > d:/Home/.emacs.d/init.elc > > The warning above is only for the unlikely case that user-init-file points to an .eln but the gethash lookup > returns nil. SGTM, thanks. From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 12:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 59334@debbugs.gnu.org, akrl@sdf.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166877528932246 (code B ref 59334); Fri, 18 Nov 2022 12:42:01 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 12:41:29 +0000 Received: from localhost ([127.0.0.1]:35642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow0gS-0008Nw-OV for submit@debbugs.gnu.org; Fri, 18 Nov 2022 07:41:29 -0500 Received: from mail-ej1-f43.google.com ([209.85.218.43]:46764) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow0gQ-0008Nf-U5 for 59334@debbugs.gnu.org; Fri, 18 Nov 2022 07:41:27 -0500 Received: by mail-ej1-f43.google.com with SMTP id bj12so12632822ejb.13 for <59334@debbugs.gnu.org>; Fri, 18 Nov 2022 04:41:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=lNyw2rEYt5JhWLu+/gdM76h1QhdNo3A/Gp2aFptLhws=; b=cW01xuMLXym71l2VcBneDfeOeUFviQ4p1e+2MxYV9FugCRToHX4wtiM+wk/DHqsCBb 3SNoF78E6Wh+kvV4JViBhKYYmEy7KtV9j2kz6RslutoBdntJw1KlGRkvFgM9+duHJGDu Cv3ejxR4nIJLR37DGn3MSF6Ls4kZysah3yuFH3bj/kjKtiWgvZVupgtsEKvR9a93QpCr 5IjS2d2c8ePvSenDUCzZJsMk2DdnKTHtlcDiQH0/5NJq5PwsvWgF+kVM5h0K5q2mdDAO 7NnBVmvz5S5ObBLrNRIMsFzu8yE86BkQKvKAQBNoOlk6mVvKCFLM+vv8WjEke/pL3wR9 Fgxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lNyw2rEYt5JhWLu+/gdM76h1QhdNo3A/Gp2aFptLhws=; b=cI2CE+rBtnYrUbNpPtOz4Qa69pBICXAOJYOQx5XpRNu7QUm9jBNfFI8RJMi+N7BPpy Zl6u6NjteH2nttZwC5y87n2MUIe1aYWxxfWuL7QeRq/EjQLkisKR/ulpicPuHoFs6YWj 97MHsQc/qi9KVbiVZ5OD0UtxbfOcXfbyfBJ75lifqsF+/quUzxtnj5I7DPg6QzY97QyY A0H+Hgjr646nkJ4ZSshHXQuqj1k75UPI3m0so+jcMTT//JaBMaJMogofxxzhFlHc3VHi +z0L5tV6HHpTQeRaiJCOAwPai/F59GE/IIQxQdpw3EjTGfhFKWl1akJ/bL6WEPhtBld3 gvMQ== X-Gm-Message-State: ANoB5pkHodm8fMlbgksPHBbxhrZ/BJ2ni0wfY4NOciNvOxmMitwgZ6/y CnyuJtUkcX9qBMCW9SPwY0CbrL1Q0xHZZB8Leb0= X-Google-Smtp-Source: AA0mqf4RK3UzXy5wjNBvgDxgSDtn79lB4ewnWoBufB8HaFtQE45oD1dWVx8ZjiPh1QfPxbzBMJrqQ1PxE+yFueTLeXo= X-Received: by 2002:a17:907:c24a:b0:7ac:2e16:bc31 with SMTP id tj10-20020a170907c24a00b007ac2e16bc31mr5754342ejc.242.1668775280827; Fri, 18 Nov 2022 04:41:20 -0800 (PST) MIME-Version: 1.0 References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> <83a64od8nb.fsf@gnu.org> <83tu2wbqgk.fsf@gnu.org> <83cz9kbfxg.fsf@gnu.org> In-Reply-To: <83cz9kbfxg.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 18 Nov 2022 13:40:44 +0100 Message-ID: Content-Type: multipart/alternative; boundary="000000000000d2e04705edbe0551" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000d2e04705edbe0551 Content-Type: text/plain; charset="UTF-8" On Fri, Nov 18, 2022 at 1:33 PM Eli Zaretskii wrote: > It could be part of startup if the forced loading of "init.el" is in > the code inside user's init file itself. Crazy, I know, but not > impossible. I suppose I'm not devious enough to think of that possibility ;-) > I think we should compare the extensions case-insensitively, but other > than that, this LGTM. Hmm. I can use `string-equal-ignore-case', if you want, but the original code was already checking for "el" case-sensitively. If so, do you want it just when checking for .eln, or for .el above also? --000000000000d2e04705edbe0551 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Fri, Nov 18, 2022 at 1:33 PM Eli Zarets= kii <eliz@gnu.org> wrote:
=C2=A0
> It could be part of startup if the forced loading o= f "init.el" is in
> the code inside user's init file it= self.=C2=A0 Crazy, I know, but not
> impossible.

I suppose I&#= 39;m not devious enough to think of that possibility ;-)

> I thin= k we should compare the extensions case-insensitively, but other
> th= an that, this LGTM.

Hmm. I can use `string-equal-ignore-case', if you w= ant, but the original code was already checking for "el" case-sen= sitively.

If so, do you want it just when checking for .eln, or for = .el above also?

--000000000000d2e04705edbe0551-- From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 12:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: 59334@debbugs.gnu.org, akrl@sdf.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.1668775859826 (code B ref 59334); Fri, 18 Nov 2022 12:51:02 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 12:50:59 +0000 Received: from localhost ([127.0.0.1]:35656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow0pf-0000DG-9z for submit@debbugs.gnu.org; Fri, 18 Nov 2022 07:50:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow0pd-0000D0-6k for 59334@debbugs.gnu.org; Fri, 18 Nov 2022 07:50:57 -0500 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 1ow0pV-0001mH-T9; Fri, 18 Nov 2022 07:50:51 -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=29n1K9Vzk/b9ICmzfxMX5Ut6yPKURrTU5pACtJkOA/Q=; b=hL9hRT85VX97 h8HKHKQ2kZTn3aFOWmEpz46cBDE489M9e30Dd+apcuJzK7pCtxQ9VDAcQr4OX2uJIFVF9use/PPkM ieUlC9HeoKZyAi8lSov0pBIusk9AQKdjmHArT2FRShVkofcy8ediZRpyZHpmlDxHVRl+fHU8y0QF6 tmC/bFwNmx9iCNi9GrzYzcYWtc0yaWqR86+5vflQGlNFhEBAp1KbOKM5/TTc6vjVU4yeCLXbKcq2v DHr9px30vLcWfWN0wWsYOVuksepN3Teq2EgIw0gmXQXOkskn4b03bdel/CNYJYw1O9Mz5FTSMJ7TH nQDnCU6l1ZChl110yrvH9g==; 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 1ow0pV-0001YS-97; Fri, 18 Nov 2022 07:50:49 -0500 Date: Fri, 18 Nov 2022 14:50:52 +0200 Message-Id: <83a64obf4j.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Juanma Barranquero on Fri, 18 Nov 2022 13:40:44 +0100) References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> <83a64od8nb.fsf@gnu.org> <83tu2wbqgk.fsf@gnu.org> <83cz9kbfxg.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juanma Barranquero > Date: Fri, 18 Nov 2022 13:40:44 +0100 > Cc: akrl@sdf.org, 59334@debbugs.gnu.org > > Hmm. I can use `string-equal-ignore-case', if you want, but the original code was already checking for "el" > case-sensitively. Actually, forget about this. It could mean complications with unibyte file names at startup, so let's leave this alone. From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 13:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 59334@debbugs.gnu.org, akrl@sdf.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.16687766912122 (code B ref 59334); Fri, 18 Nov 2022 13:05:01 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 13:04:51 +0000 Received: from localhost ([127.0.0.1]:35670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow135-0000YA-9K for submit@debbugs.gnu.org; Fri, 18 Nov 2022 08:04:51 -0500 Received: from mail-ed1-f44.google.com ([209.85.208.44]:46845) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow12v-0000Xd-9i for 59334@debbugs.gnu.org; Fri, 18 Nov 2022 08:04:46 -0500 Received: by mail-ed1-f44.google.com with SMTP id z20so5573564edc.13 for <59334@debbugs.gnu.org>; Fri, 18 Nov 2022 05:04:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RaAwt1wrOWrLuXB/18BxaySb4S86nMcNyGGf/ZqoedU=; b=QqJMVmMFtWvr6X9Qtym9AlzryPiRA6srp2Hq7/uGDQzDaAXiuTAQeI+ZVlxtU25bTX QQAjF+mufnW1arwHwtM5oNK219mC5BojaMOrkuEQd93Fi3WkxlHk9654MKTQweeBTZ2F lMj7RtqgAVKw4dg4mIP7QvkTSv7eJA4aWEtC92qb68VswEkIRFAQ0u2+zbeyXqzvB/kK itVgrHoYMAFrPDUMcRHYyl5QhDY4Be54Z94tUkXqY21G8i0JhKX8+TCAQoQgVAsku1jv TEpIDKMFN0uOS4KfaDspNIhGRUUjFDCoHuHwiAPsbHINoxUEMfG/+80YmoWODFwxyh7f xJNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RaAwt1wrOWrLuXB/18BxaySb4S86nMcNyGGf/ZqoedU=; b=vB+45c2zawzLg120pb+i5ggeuGYuXZxdgDuVtIZvyga06/qoVW0WXv4RcNgxDMzPp2 t3w+peZCNTqh5Z9rHpROyuC/ivDTnYbWJ82su6fPuZweQtImRe0PofjfwxIGe+rv8kQT fY2SGPGPj4PxXGzkmi85kybPYu/uu/6/Iafo7Put5mIkJPtY+x74iDAhIeEyIXHZcfIV hTdVjbWAd0rUCO2xBGF5ryyciWcan0u0AGaFoq36OmZSIYqp4EtolIXKgZeEyoFRH7jm MdDXISFPpKcUSjMCWKM9BIfVXilw8dKVsV7O+WWP/eFDOExuhWjl0lCvqkhY1ogYhtqR GrWQ== X-Gm-Message-State: ANoB5pncTUYc85ddqjhmf5nvjSyycrEBMczBDlwDIe2Xy6P7JSHvAWkh Tnu8UZ8i2Dz2a92YtpYR6k/PL8etJpClva6xK2I= X-Google-Smtp-Source: AA0mqf6OlY0b8tdOP7/QnJhuauAj7q/OKQzyE2CjWhX/1yHA/Ri8HdQs4ee0ATfEf5A7n4ScpkpXLnt8RDDj+vdjN2Y= X-Received: by 2002:a05:6402:1050:b0:467:e9a5:77c5 with SMTP id e16-20020a056402105000b00467e9a577c5mr6067193edu.289.1668776675456; Fri, 18 Nov 2022 05:04:35 -0800 (PST) MIME-Version: 1.0 References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> <83a64od8nb.fsf@gnu.org> <83tu2wbqgk.fsf@gnu.org> <83cz9kbfxg.fsf@gnu.org> <83a64obf4j.fsf@gnu.org> In-Reply-To: <83a64obf4j.fsf@gnu.org> From: Juanma Barranquero Date: Fri, 18 Nov 2022 14:03:59 +0100 Message-ID: Content-Type: multipart/alternative; boundary="000000000000f33b0905edbe5803" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000f33b0905edbe5803 Content-Type: text/plain; charset="UTF-8" close 59334 29.0.50 quit Fixed by commit c116d9f74c of 2022-11-18 Avoid `user-init-file' being set to an eln file (bug#59334) --000000000000f33b0905edbe5803 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
close 59334 29.0.50
quit

Fixed by commit
<= /font>
c116d9f74c=C2=A0 of=C2=A0 2022-11-18=C2= =A0 Avoid `user-init-file' being set to an eln file (bug#59334)<= br>
--000000000000f33b0905edbe5803-- From unknown Mon Aug 18 09:06:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Nov 2022 20:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59334 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Juanma Barranquero , 59334@debbugs.gnu.org Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166880176223743 (code B ref 59334); Fri, 18 Nov 2022 20:03:02 +0000 Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 20:02:42 +0000 Received: from localhost ([127.0.0.1]:38349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow7ZR-0006Ap-Gy for submit@debbugs.gnu.org; Fri, 18 Nov 2022 15:02:41 -0500 Received: from mx.sdf.org ([205.166.94.24]:64815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow7ZP-0006AX-TJ for 59334@debbugs.gnu.org; Fri, 18 Nov 2022 15:02:40 -0500 Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 2AIK2bVS013338 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Fri, 18 Nov 2022 20:02:39 GMT From: Andrea Corallo In-Reply-To: <83cz9kbfxg.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Nov 2022 14:33:31 +0200") References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> <83a64od8nb.fsf@gnu.org> <83tu2wbqgk.fsf@gnu.org> <83cz9kbfxg.fsf@gnu.org> Date: Fri, 18 Nov 2022 20:02:36 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: Juanma Barranquero >> Date: Fri, 18 Nov 2022 10:05:50 +0100 >> Cc: akrl@sdf.org, 59334@debbugs.gnu.org >> >> > I thought about a possibility that the session loaded a .eln file, but >> > then the user or some Lisp explicitly loaded the .el file by hand. >> > I'm not sure in this case the hash table is updated. >> >> That's a whole another problem, isn't it? > > Not necessarily. > >> On one hand, it would not affect user-init-file, as it's not the >> usual startup procedure. > > It could be part of startup if the forced loading of "init.el" is in > the code inside user's init file itself. Crazy, I know, but not > impossible. > >> And, on the other hand, >> my patch sets user-init-file to the source .el, so after reloading that file it would still have the right value, >> wouldn't it? > > If that is the same file, yes. But what if there's an init.el in > another place? > > In any case, we don't need to keep arguing about this, since your > pat6ch indeed uses gethash only if the init file has the .eln > extension. > >> The original code is untouched, other than changing `when' to `if'; the else part deals with the .eln. > > I think we should compare the extensions case-insensitively, but other > than that, this LGTM. > > Andrea, any comments? Agree and I don't have any further comment. Thanks Andrea