[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does one find out what file a library has been loaded from?

From: Stefan Monnier
Subject: Re: How does one find out what file a library has been loaded from?
Date: Thu, 21 Jul 2022 13:52:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> It's accurate, though.  The current text is not accurate.  The situation
> it is describing is vague and confusing.
> Would this strategy be an improvement: "This function returns a file
> name.  When the file from which the function was loaded was a source
> file or byte compiled file .......  When that file was a native compiled
> file ......."?

BTW, the design of the native code compiler is that it aims to be
transparent, a bit like a JIT compiler would be transparent: whether the
native code comes from a .eln file or was generated on-the-fly or
combined from several .eln files (or any other option you can come
up with) should ideally not matter (ELisp code shouldn't need to know
and end-users shouldn't need to know either (barring bugs or curiosity
of course)).

Clearly we do want to make that info visible somehow (e.g. for debugging
purposes, but also because we can never make something really
transparent), but it's very different from `load-history` which keeps
track of information that is relevant: whether /usr/share/.../org.el, or
usr/share/.../org.elc, or ~/.emacs.d/elpa/.../org.el, or ... was loaded
can result in different outcomes even if there's no bug anywhere.
Those 4 files do not have the same semantics., e.g. because it's not the
same version of Org, or because of the `eval-when-compile` in `org.el`.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]