unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: 59334@debbugs.gnu.org, akrl@sdf.org
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	[thread overview]
Message-ID: <83cz9kbfxg.fsf@gnu.org> (raw)
In-Reply-To: <CAAeL0SRUPtm=+q=TvApDFk9cnEHMX-NwaBK7Lqc2dnsgu5-2LA@mail.gmail.com> (message from Juanma Barranquero on Fri, 18 Nov 2022 10:05:50 +0100)

> From: Juanma Barranquero <lekktu@gmail.com>
> 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.





  parent reply	other threads:[~2022-11-18 12:33 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17  9:28 bug#59334: 29.0.50; loading native-compiled init file sets user-init-file to .eln Juanma Barranquero
2022-11-17 12:07 ` Eli Zaretskii
2022-11-17 13:30   ` Juanma Barranquero
2022-11-17 14:00     ` Eli Zaretskii
2022-11-17 20:04       ` Andrea Corallo
2022-11-17 20:09         ` Eli Zaretskii
2022-11-18  2:25           ` Juanma Barranquero
2022-11-18  2:56             ` Juanma Barranquero
2022-11-18  3:03               ` Juanma Barranquero
2022-11-18  7:50                 ` Eli Zaretskii
2022-11-18  7:19             ` Eli Zaretskii
2022-11-18  7:27             ` Eli Zaretskii
2022-11-18  7:45               ` Juanma Barranquero
2022-11-18  8:46                 ` Eli Zaretskii
2022-11-18  9:05                   ` Juanma Barranquero
2022-11-18  9:08                     ` Juanma Barranquero
2022-11-18 12:33                     ` Eli Zaretskii [this message]
2022-11-18 12:40                       ` Juanma Barranquero
2022-11-18 12:50                         ` Eli Zaretskii
2022-11-18 13:03                           ` Juanma Barranquero
2022-11-18 20:02                       ` Andrea Corallo
2022-11-18 10:39                   ` Andrea Corallo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83cz9kbfxg.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=59334@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=lekktu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).