emacs-devel
[Top][All Lists]
Advanced

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

Re: Should Emacs define site-lisp load-path for Dynamically-Loaded Modul


From: Björn Bidar
Subject: Re: Should Emacs define site-lisp load-path for Dynamically-Loaded Modules?
Date: Sat, 30 Sep 2023 00:04:24 +0300
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Björn Bidar <bjorn.bidar@thaodan.de>
>> Date: Tue, 26 Sep 2023 18:41:25 +0300
>> 
>> 
>> Recently I have began on packaging Emacs packages for OpenSuSE Linux,
>> many of whom use dynamic modules.
>> 
>> I noticed that almost all packages that use dynamic modules compile
>> the module after installation and store it in the package directory.
>> 
>> Emacs define site-lisp for locally installed libraries however the
>> directory is usually contained inside <datadir>.
>> 
>> That makes me ask the questions should there be a second site-lisp for
>> dynamic modules in <libdir> by default?
>
> Any rationale for doing that?  I mean, "should there be" is not really
> a rationale...
>
> We look for dynamic modules in the same directories as Lisp files for
> 2 reasons:
>
>   . a dynamic module frequently comes with a part written in Lisp
>     alongside the part written in C or some other language, so it
>     makes sense to allow keeping these parts together;
      Do we store the Emacs binary in the same directory as the lisp
      code (on every platform)?
      site-lisp as Alfred wrote is stored in datadir where only
      architecture independent code is allowed. The same is true for the
      Emacs Lisp provided by Emacs itself.
      The same reason why (native) compiled Emacs-Lisp is stored in
      lidir, while Emacs-Lisp or it's byte compiled variant is stored
      in datadir.
      

>   . dynamic modules are loaded by the 'load' primitive, so looking in
>     the same directories makes loading easier to understand and use
      the load primitive uses the load-path, adding another path to said
      path seems trivial to me.



reply via email to

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