From: Philip Kaludercic <philipk@posteo.net>
To: Xiyue Deng <manphiz@gmail.com>
Cc: Jeremy Bryant <jb@jeremybryant.net>, 71789@debbugs.gnu.org
Subject: bug#71789: 29.3; Handling of nested directories of ELPA packages
Date: Sun, 30 Jun 2024 10:47:06 +0000 [thread overview]
Message-ID: <87ed8elnbp.fsf@posteo.net> (raw)
In-Reply-To: <87o77i207z.fsf@debian-hx90.lan> (Xiyue Deng's message of "Sun, 30 Jun 2024 03:28:48 -0700")
Xiyue Deng <manphiz@gmail.com> writes:
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Jeremy Bryant <jb@jeremybryant.net> writes:
>>
>>> Xiyue Deng <manphiz@gmail.com> writes:
>>>
>>>> Hi,
>>>>
>>>> I'm opening a bug to follow up the discussion at [1]. Given an ELPA
>>>> package `elpafoo' that contains another directory `elpabar' that also
>>>> holds source files, e.g. like the structure below:
>>>>
>>>> ,----
>>>> | ~/.config/emacs/elpa/elpafoo/
>>>> | ~/.config/emacs/elpa/elpafoo/elpafoo.el
>>>> | ~/.config/emacs/elpa/elpafoo/elpabar
>>>> | ~/.config/emacs/elpa/elpafoo/elpabar/elpabar.el
>>>> `----
>>>>
>>>> When installing through package.el, both elpafoo.el and
>>>> elpabar/elpabar.el will be byte-compiled, but only the root source path
>>>> `~/.config/emacs/elpa/elpafoo' is added to `load-path', without any of
>>>> the nested directories.
>>>>
>>>> I wonder whether this is the intended behavior regarding `load-path'
>>>> handling. If nested directories are added, it has the advantage to
>>>> allow more fine-grained source organization; as a downside, it may
>>>> unnecessarily add more unneeded stuff and processing overhead (as
>>>> Michael pointed out at [2]), and potentially break existing code,
>>>> e.g. auctex, which seems to vendor stuff in the `style/' directories but
>>>> not loaded so it's not causing any trouble yet.
>>>>
>>>> So I wonder what is the stance of the Emacs maintainer on this subject,
>>>> or whether this is documented anywhere. Also one more step: whether
>>>> there is a recommended layout for source code organization for ELPA
>>>> packages.
>>
>> I think it is intentional, because the approach is simple but functional
>> enough in most instances. If you need to load a sub-directory, you can
>> add an autoloaded `add-to-list' expression in elpafoo.el.
>>
>
> Thanks Jeremy and Philip! I had a router issue a few days ago and
> didn't got a confirmation about this bug so I filed a similar bug at
> bug#71817, where Stefan offered a similar explanation there as well.
Right, I noticed that too late. But good to have two independent
responses coincide in their suggestion.
> Also please feel free to merge this bug with bug#71817 to reduce
> duplications. Thanks!
I should have merged the reports.
--
Philip Kaludercic on peregrine
prev parent reply other threads:[~2024-06-30 10:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 23:25 bug#71789: 29.3; Handling of nested directories of ELPA packages Xiyue Deng
2024-06-28 18:03 ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-30 10:17 ` Philip Kaludercic
2024-06-30 10:28 ` Xiyue Deng
2024-06-30 10:47 ` Philip Kaludercic [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=87ed8elnbp.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=71789@debbugs.gnu.org \
--cc=jb@jeremybryant.net \
--cc=manphiz@gmail.com \
/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).