unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: elisp packages discovery (was: bug#27686: emacs-ess: Not installed in "${output}/share/emacs/site-lisp/guix.d)"
       [not found]     ` <87lgmfmmsa.fsf@gmail.com>
@ 2017-09-01 14:49       ` Maxim Cournoyer
  2017-09-02 20:08         ` elisp packages discovery Alex Kost
  0 siblings, 1 reply; 2+ messages in thread
From: Maxim Cournoyer @ 2017-09-01 14:49 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Hi Alex!

Alex Kost <alezost@gmail.com> writes:

> Maxim Cournoyer (2017-08-15 12:08 -0400) wrote:
>
>> On Tue, Jul 18, 2017 at 9:52 AM, Alex Kost <alezost@gmail.com> wrote:
> [...]
>>     A side note: this is one of the reasons why I don't like "guix.d"
>>     sub-directory.  I think it is a useless extra level in the file
>>     hierarchy.  If we used:
>>
>>       .../share/emacs/site-lisp/<package>
>>
>> While I agree that packaging elisp files in their own folder is
>> cleaner, it also introduces some complexity such as the requirement
>> to add some glue code in the Emacs site-start.el for packages
>> discovery.
>>
>> This mechanism is only valid when working with a profile;
>> at build time (say, you want to run tests which depend on other Emacs
>> packages), another hack is required + manual fiddling.
>>
>> By contrast, if all of our Emacs packages were laid out flat under
>> the usual share/emacs/site-lisp/ like it's done on other
>> distributions,
>
> I wonder how many emacs packages these distributions provide and whether
> they have any name conflicts in "site-lisp" or not.

I should have researched what I said beforehand; I just looked at how
Debian does it, and it seems they are also isolating package files in
their own subdir under an elpa-src diretory[0], or at least going into
that direction. Their approach is a bit different; they make use of
package.el which ships with Emacs, so they do not need any custom code
in site-start.

Gentoo is also using a <package> subdirectory[1]:
/usr/share/emacs/site-lisp/package/ and rely on some custom site-start
elisp glue for packages discovery. So, I'm not sure if there are any
distribution actually packaging their elisp libraries directly under the
share/emacs/site-lisp like I thought was the case. Sorry for the
misinformation!

>> we could simply define the EMACSLOADPATH `search-path'
>> at the Emacs package definition level, and the rest would be taken
>> care of by Guix native mechanisms (no hacks required).
>>
>> IMHO, this would be more "Guixy".
>
> The only problem with this flat structure I see is the potential name
> conflicts.  Federico (the author of the 'emacs-build-system') explained
> it here:
>
>   http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00398.html

That's a valid concern. Thanks for sharing your thoughts. I'll continue
to ponder about it.

Maxim

[0] https://anonscm.debian.org/cgit/pkg-emacsen/pkg/dh-elpa.git/tree/README.org
[1] https://wiki.gentoo.org/wiki/Project:GNU_Emacs/Developer_guide

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

* Re: elisp packages discovery
  2017-09-01 14:49       ` elisp packages discovery (was: bug#27686: emacs-ess: Not installed in "${output}/share/emacs/site-lisp/guix.d)" Maxim Cournoyer
@ 2017-09-02 20:08         ` Alex Kost
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Kost @ 2017-09-02 20:08 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: guix-devel

Maxim Cournoyer (2017-09-01 10:49 -0400) wrote:

> Hi Alex!
>
> Alex Kost <alezost@gmail.com> writes:
>
>> Maxim Cournoyer (2017-08-15 12:08 -0400) wrote:
>>
>>> On Tue, Jul 18, 2017 at 9:52 AM, Alex Kost <alezost@gmail.com> wrote:
>> [...]
>>>     A side note: this is one of the reasons why I don't like "guix.d"
>>>     sub-directory.  I think it is a useless extra level in the file
>>>     hierarchy.  If we used:
>>>
>>>       .../share/emacs/site-lisp/<package>
>>>
>>> While I agree that packaging elisp files in their own folder is
>>> cleaner, it also introduces some complexity such as the requirement
>>> to add some glue code in the Emacs site-start.el for packages
>>> discovery.
>>>
>>> This mechanism is only valid when working with a profile;
>>> at build time (say, you want to run tests which depend on other Emacs
>>> packages), another hack is required + manual fiddling.
>>>
>>> By contrast, if all of our Emacs packages were laid out flat under
>>> the usual share/emacs/site-lisp/ like it's done on other
>>> distributions,
>>
>> I wonder how many emacs packages these distributions provide and whether
>> they have any name conflicts in "site-lisp" or not.
>
> I should have researched what I said beforehand; I just looked at how
> Debian does it, and it seems they are also isolating package files in
> their own subdir under an elpa-src diretory[0], or at least going into
> that direction. Their approach is a bit different; they make use of
> package.el which ships with Emacs, so they do not need any custom code
> in site-start.

I think it would be good to reduce the size of our "site-start" code by
re-using "package.el" facilities, although removing it completely will
probably not be possible since we use non-standard directories, where
Emacs does not look for packages (I mean the user and system Guix
profiles).

> Gentoo is also using a <package> subdirectory[1]:
> /usr/share/emacs/site-lisp/package/ and rely on some custom site-start
> elisp glue for packages discovery. So, I'm not sure if there are any
> distribution actually packaging their elisp libraries directly under the
> share/emacs/site-lisp like I thought was the case. Sorry for the
> misinformation!

No problem!

> [0] https://anonscm.debian.org/cgit/pkg-emacsen/pkg/dh-elpa.git/tree/README.org
> [1] https://wiki.gentoo.org/wiki/Project:GNU_Emacs/Developer_guide

Thanks for the pointers!

-- 
Alex

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

end of thread, other threads:[~2017-09-02 20:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87k23c34vj.fsf@openmailbox.org>
     [not found] ` <87h8y9ua1n.fsf@gmail.com>
     [not found]   ` <CAN-vT6QPR1E_Ex7ScKckTGY13OjEubYzygj40==jOXkoBzK0jw@mail.gmail.com>
     [not found]     ` <87lgmfmmsa.fsf@gmail.com>
2017-09-01 14:49       ` elisp packages discovery (was: bug#27686: emacs-ess: Not installed in "${output}/share/emacs/site-lisp/guix.d)" Maxim Cournoyer
2017-09-02 20:08         ` elisp packages discovery Alex Kost

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.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).