all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Xiyue Deng <manphiz@gmail.com>
Cc: Michael Heerdegen via "Emacs development discussions."
	<emacs-devel@gnu.org>
Subject: Re: Question regarding load-path handling for ELPA packages
Date: Wed, 22 May 2024 17:53:28 +0200	[thread overview]
Message-ID: <87bk4xvo5j.fsf@web.de> (raw)
In-Reply-To: <87ikz93tlh.fsf@debian-hx90.lan> (Xiyue Deng's message of "Sun, 19 May 2024 23:06:34 -0700")

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?

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?

> 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.

Michael.



  reply	other threads:[~2024-05-22 15:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10  3:09 Question regarding load-path handling for ELPA packages Xiyue Deng
2024-05-17 16:30 ` Xiyue Deng
2024-05-17 17:33   ` Michael Heerdegen via Emacs development discussions.
2024-05-17 21:32     ` Xiyue Deng
2024-05-18 15:18       ` Michael Heerdegen via Emacs development discussions.
2024-05-18 21:04         ` Michael Heerdegen via Emacs development discussions.
2024-05-19  7:29         ` Xiyue Deng
2024-05-19 20:11           ` Michael Heerdegen via Emacs development discussions.
2024-05-20  6:06             ` Xiyue Deng
2024-05-22 15:53               ` Michael Heerdegen [this message]
2024-05-23  1:42                 ` Xiyue Deng
2024-05-26 13:55                   ` Michael Heerdegen
2024-05-27  5:30                     ` Xiyue Deng
2024-05-17 21:33   ` Michael Heerdegen via Emacs development discussions.

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bk4xvo5j.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=emacs-devel@gnu.org \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.