[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Where should dynamic modules be installed?
From: |
Andy Moreton |
Subject: |
Re: Where should dynamic modules be installed? |
Date: |
Thu, 24 Oct 2019 13:02:26 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) |
On Wed 23 Oct 2019, Paul Eggert wrote:
> On 10/21/19 3:45 AM, Ulrich Mueller wrote:
>> We are going to include the first package with a dynamically loaded
>> module (emacs-libvterm) in Gentoo. The question arose where the .so file
>> should be installed? Since it is a system dependent binary, installing
>> it under /usr/share/emacs/ looks wrong. I cannot find anything about a
>> recommended install location in the documentation.
>
> There isn't one. We haven't thought through the issues here. Thanks for
> bringing up the topic.
>
>> Would /usr/lib{,64}/emacs/site-modules/ be a reasonable place for this?
>
> Where do you put executables like hexl, movemail, and profile? I suggest
> puting .so files near there. In Fedora 30, this directory is
> /usr/libexec/emacs/26.2/x86_64-redhat-linux-gnu (which is the value of the
> exec-directory variable). Since modules can be version-specific, it makes
> sense to have the Emacs version number somewhere in the directory name. Do you
> do that with other Emacs directories?
>
> Also, why have "site-" in the name? Do you have "site-" in other Emacs-related
> directory names?
>
>> Also, wouldn't it be cleaner if Emacs had a separate variable (analog to
>> image-load-path, custom-theme-load-path, etc.) for loading of dynamic
>> modules, instead of reusing load-path?
>
> Emacs should do that, yes. How about if we use a variable named
> 'module-directory' for that? It would work like exec-directory, except
> for modules.
`exec-directory' is documented as being for executables installed from
the emacs distribution, whereas modules may be installed from other
sources.
Why not use `module-load-path` to allow for system/site/user locations
for dynamic modules ?
> I expect that the main reason Emacs doesn't have a variable like
> module-directory now, is that packagers haven't yet encountered the
> Emacs module system (it has been off by default, though that will change in
> Emacs 27) and so haven't run into problems like the one you mention.
Indeed.
AndyM