From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Date: Fri, 18 Nov 2022 14:33:31 +0200 Message-ID: <83cz9kbfxg.fsf@gnu.org> References: <8335aheqct.fsf@gnu.org> <83wn7td6l0.fsf@gnu.org> <83fsehcpi2.fsf@gnu.org> <83a64od8nb.fsf@gnu.org> <83tu2wbqgk.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15100"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59334@debbugs.gnu.org, akrl@sdf.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 18 13:34:16 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ow0ZU-0003gf-RY for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Nov 2022 13:34:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ow0ZK-00056b-2x; Fri, 18 Nov 2022 07:34:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ow0ZH-00056P-Jd for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 07:34:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ow0ZG-0006qQ-M6 for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 07:34:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ow0ZG-0008DE-F5 for bug-gnu-emacs@gnu.org; Fri, 18 Nov 2022 07:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: 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 Original-Received: via spool by 59334-submit@debbugs.gnu.org id=B59334.166877481531527 (code B ref 59334); Fri, 18 Nov 2022 12:34:02 +0000 Original-Received: (at 59334) by debbugs.gnu.org; 18 Nov 2022 12:33:35 +0000 Original-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 Original-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 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 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==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ow0Yh-0000Aj-58; Fri, 18 Nov 2022 07:33:28 -0500 In-Reply-To: (message from Juanma Barranquero on Fri, 18 Nov 2022 10:05:50 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248221 Archived-At: > 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.