[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question regarding load-path handling for ELPA packages
From: |
Xiyue Deng |
Subject: |
Re: Question regarding load-path handling for ELPA packages |
Date: |
Wed, 22 May 2024 18:42:38 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Xiyue Deng <manphiz@gmail.com> writes:
>
>> Thanks for your expanded explanations and code pointers! It helped me a
>> lot in understanding how package.el handles `load-path'. After some
>> more investigation, it turns out the behavior I observe in dh-elpa
>> installation path is actually a result of the existence of subdirs.el in
>> its parent directory. I have added an extended explanations in the
>> Debian tracking bug[1].
>
> I didn't investigate that much - but AFAIU
> `normal-top-level-add-to-load-path' doesn't add subdirectories
> recursively. Or does it?
>
This is the content of subdirs.el:
,----
| (if (fboundp 'normal-top-level-add-subdirs-to-load-path)
| (normal-top-level-add-subdirs-to-load-path))
`----
So looks like it does :)
> And - we are lucky and I'm on Debian, so I can have a look.
>
> On my stable branch system, an emacs installation with package "auctex"
> installed will not have subdirectories of auctex stuff installed. After
> startup I only see "/usr/share/emacs/site-lisp/auctex" and
> "/usr/share/auctex" in `load-path'. Or does your problem occur in
> experimental only?
>
(This part is mostly Debian centric.)
Sorry I wasn't very clear about the auctex status. As a matter of fact,
the current auctex is not yet Elpafied, so while it's usable, its
current installation is not detected by package.el so that if you use
`(use-package auctex :ensure t)' it will install a separate auctex from
ELPA (see tracking bug[1]). On the other hand, I am experimenting an
attempt to Elpafy auctex[2] based on the recursive byte-compiling which
I'm also experimenting on dh-elpa and is mostly ready[3], with your help
here. With this support dh-elpa can keep the same directory layout as
ELPA for package with source files in nested directories as well.
>> I think one last question I'd like to ask is the direction of
>> subdirectory handling in ELPA packages. Though currently the case of
>> auctex may cause breakage, this is in the minority and hence fixing it
>> can be localized to just one package, while there may be benefits to do
>> so for other cases.
>
> What would those benefits be?
>
> Note that subdirectories may contain random stuff like test files not to
> be intended to be loaded for normal functioning at all. It's not a
> problem to keep the "normal" source code files in the top-level
> directory - there is room enough there... And keeping load-path small
> makes lookup faster. We may add a lot of unnecessary crap. Things
> would also get harder to investigate with load-path complicated in such
> a way. Any package still can add subdirectories explicitly. In sum I
> see more disadvantages.
I agree with you arguments here. My initial thoughts for adding
subdirectories are mainly to give developer some flexibilities to
organize the source code, but if subdirectories can be added explicitly
then it's fine. Do you know where how that's done is documented for
ELPA?
>
> Michael.
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056939
[2] https://salsa.debian.org/manphiz/auctex/-/tree/elpafy-new?ref_type=heads
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1069210
--
Xiyue Deng
- Question regarding load-path handling for ELPA packages, Xiyue Deng, 2024/05/09
- Re: Question regarding load-path handling for ELPA packages, Xiyue Deng, 2024/05/17
- Re: Question regarding load-path handling for ELPA packages, Michael Heerdegen, 2024/05/17
- Re: Question regarding load-path handling for ELPA packages, Xiyue Deng, 2024/05/17
- Re: Question regarding load-path handling for ELPA packages, Michael Heerdegen, 2024/05/18
- Re: Question regarding load-path handling for ELPA packages, Michael Heerdegen, 2024/05/18
- Re: Question regarding load-path handling for ELPA packages, Xiyue Deng, 2024/05/19
- Re: Question regarding load-path handling for ELPA packages, Michael Heerdegen, 2024/05/19
- Re: Question regarding load-path handling for ELPA packages, Xiyue Deng, 2024/05/20
- Re: Question regarding load-path handling for ELPA packages, Michael Heerdegen, 2024/05/22
- Re: Question regarding load-path handling for ELPA packages,
Xiyue Deng <=
- Re: Question regarding load-path handling for ELPA packages, Michael Heerdegen, 2024/05/26
- Re: Question regarding load-path handling for ELPA packages, Xiyue Deng, 2024/05/27
Re: Question regarding load-path handling for ELPA packages, Michael Heerdegen, 2024/05/17