unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Björn Bidar" <bjorn.bidar@thaodan.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Should Emacs define site-lisp load-path for Dynamically-Loaded Modules?
Date: Sat, 30 Sep 2023 00:04:24 +0300	[thread overview]
Message-ID: <87bkdk1yjr.fsf@thaodan.de> (raw)
In-Reply-To: <837co91cgv.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 29 Sep 2023 13:49:04 +0300")

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	other threads:[~2023-09-29 21:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 15:41 Should Emacs define site-lisp load-path for Dynamically-Loaded Modules? Björn Bidar
2023-09-26 16:10 ` Alfred M. Szmidt
2023-09-26 19:40   ` Björn Bidar
2023-09-29 12:36     ` Alfred M. Szmidt
2023-09-29 20:56       ` Björn Bidar
2023-09-29 10:49 ` Eli Zaretskii
2023-09-29 21:04   ` Björn Bidar [this message]

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=87bkdk1yjr.fsf@thaodan.de \
    --to=bjorn.bidar@thaodan.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).