unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Default value of native-comp-eln-load-path
@ 2022-01-13  7:52 Lele Gaifax
  2022-01-13  9:19 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Lele Gaifax @ 2022-01-13  7:52 UTC (permalink / raw)
  To: emacs-devel

Hi all,

on a self-compiled one-week old GNU/Emacs (commit 808f69bf), I see
the following:

  $ cd $HOME; emacs --batch --execute "(print native-comp-eln-load-path)"

  ("/home/lele/.emacs.d/eln-cache/" "/home/native-lisp/")

  $ cd /tmp; emacs --batch --execute "(print native-comp-eln-load-path)"

  ("/home/lele/.emacs.d/eln-cache/" "/native-lisp/")

Indeed, that variable is defined in src/comp.c as

  /* Temporary value in use for bootstrap.  We can't do better as
     `invocation-directory' is still unset, will be fixed up during
     dump reload.  */
  Vnative_comp_eln_load_path = Fcons (build_string ("../native-lisp/"), Qnil);

What is the purpose of that relative "native-lisp" entry?

I guess nobody has a roommate with that name, that could play dirty tricks
putting casual .eln files in his home dir, but who knows? :-)

Thanks and bye, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Default value of native-comp-eln-load-path
  2022-01-13  7:52 Default value of native-comp-eln-load-path Lele Gaifax
@ 2022-01-13  9:19 ` Eli Zaretskii
  2022-01-13 13:49   ` Lele Gaifax
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2022-01-13  9:19 UTC (permalink / raw)
  To: Lele Gaifax; +Cc: emacs-devel

> From: Lele Gaifax <lele@metapensiero.it>
> Date: Thu, 13 Jan 2022 08:52:21 +0100
> 
> on a self-compiled one-week old GNU/Emacs (commit 808f69bf), I see
> the following:
> 
>   $ cd $HOME; emacs --batch --execute "(print native-comp-eln-load-path)"
> 
>   ("/home/lele/.emacs.d/eln-cache/" "/home/native-lisp/")
> 
>   $ cd /tmp; emacs --batch --execute "(print native-comp-eln-load-path)"
> 
>   ("/home/lele/.emacs.d/eln-cache/" "/native-lisp/")

Is this an installed Emacs, i.e. did you "make install" after building
it?

Anyway, I cannot reproduce this here.

> Indeed, that variable is defined in src/comp.c as
> 
>   /* Temporary value in use for bootstrap.  We can't do better as
>      `invocation-directory' is still unset, will be fixed up during
>      dump reload.  */
>   Vnative_comp_eln_load_path = Fcons (build_string ("../native-lisp/"), Qnil);
> 
> What is the purpose of that relative "native-lisp" entry?

It's complicated to explain (but the reasons are valid).  In any case,
as the comment says, the value is supposed to be resolved when Emacs
loads the .pdmp file.  Why it didn't happen in your case requires more
investigation.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Default value of native-comp-eln-load-path
  2022-01-13  9:19 ` Eli Zaretskii
@ 2022-01-13 13:49   ` Lele Gaifax
  2022-01-13 14:05     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Lele Gaifax @ 2022-01-13 13:49 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Lele Gaifax <lele@metapensiero.it>
>> Date: Thu, 13 Jan 2022 08:52:21 +0100
>> 
>> on a self-compiled one-week old GNU/Emacs (commit 808f69bf), I see
>> the following:
>> 
>>   $ cd $HOME; emacs --batch --execute "(print native-comp-eln-load-path)"
>> 
>>   ("/home/lele/.emacs.d/eln-cache/" "/home/native-lisp/")
>> 
>>   $ cd /tmp; emacs --batch --execute "(print native-comp-eln-load-path)"
>> 
>>   ("/home/lele/.emacs.d/eln-cache/" "/native-lisp/")
>
> Is this an installed Emacs, i.e. did you "make install" after building
> it?

Yes, sure.

>> Indeed, that variable is defined in src/comp.c as
>> 
>>   /* Temporary value in use for bootstrap.  We can't do better as
>>      `invocation-directory' is still unset, will be fixed up during
>>      dump reload.  */
>>   Vnative_comp_eln_load_path = Fcons (build_string ("../native-lisp/"), Qnil);
>> 
>> What is the purpose of that relative "native-lisp" entry?
>
> It's complicated to explain (but the reasons are valid).  In any case,
> as the comment says, the value is supposed to be resolved when Emacs
> loads the .pdmp file.  Why it didn't happen in your case requires more
> investigation.

I will try to understand why it doesn't happen in my case, first of all
locating where that resolution should happen.

Thanks&bye, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele@metapensiero.it  |                 -- Fortunato Depero, 1929.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Default value of native-comp-eln-load-path
  2022-01-13 13:49   ` Lele Gaifax
@ 2022-01-13 14:05     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2022-01-13 14:05 UTC (permalink / raw)
  To: Lele Gaifax; +Cc: emacs-devel

> From: Lele Gaifax <lele@metapensiero.it>
> Date: Thu, 13 Jan 2022 14:49:51 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> What is the purpose of that relative "native-lisp" entry?
> >
> > It's complicated to explain (but the reasons are valid).  In any case,
> > as the comment says, the value is supposed to be resolved when Emacs
> > loads the .pdmp file.  Why it didn't happen in your case requires more
> > investigation.
> 
> I will try to understand why it doesn't happen in my case, first of all
> locating where that resolution should happen.

It happens when we load the emacs.pdmp file, see the call to
fixup_eln_load_path in pdumper.c.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-13 14:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13  7:52 Default value of native-comp-eln-load-path Lele Gaifax
2022-01-13  9:19 ` Eli Zaretskii
2022-01-13 13:49   ` Lele Gaifax
2022-01-13 14:05     ` Eli Zaretskii

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).