From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#71789: 29.3; Handling of nested directories of ELPA packages Date: Sun, 30 Jun 2024 10:47:06 +0000 Message-ID: <87ed8elnbp.fsf@posteo.net> References: <8734oz478n.fsf@debian-hx90.lan> <87ikxthrm5.fsf@jeremybryant.net> <87wmm6lopu.fsf@posteo.net> <87o77i207z.fsf@debian-hx90.lan> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22683"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jeremy Bryant , 71789@debbugs.gnu.org To: Xiyue Deng Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 30 12:48:25 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sNs6b-0005dX-AQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Jun 2024 12:48:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNs6H-0007QG-UD; Sun, 30 Jun 2024 06:48:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sNs6E-0007Pr-75 for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2024 06:48:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sNs6D-0006H6-V0 for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2024 06:48:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sNs6D-0001rs-OU for bug-gnu-emacs@gnu.org; Sun, 30 Jun 2024 06:48:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Jun 2024 10:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71789 X-GNU-PR-Package: emacs Original-Received: via spool by 71789-submit@debbugs.gnu.org id=B71789.17197444357064 (code B ref 71789); Sun, 30 Jun 2024 10:48:01 +0000 Original-Received: (at 71789) by debbugs.gnu.org; 30 Jun 2024 10:47:15 +0000 Original-Received: from localhost ([127.0.0.1]:55252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNs5T-0001pr-C0 for submit@debbugs.gnu.org; Sun, 30 Jun 2024 06:47:15 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:33599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sNs5R-0001pW-MX for 71789@debbugs.gnu.org; Sun, 30 Jun 2024 06:47:14 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7963E240027 for <71789@debbugs.gnu.org>; Sun, 30 Jun 2024 12:47:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1719744427; bh=Ohd9v9DSXtR8lxyJsioDrt9TrmWjsbB9DmAvcL+tBXs=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=VBhvVOctq1JYURDKyI4L8ZWVjoq8NE4WcQ0gBZd47pDIaH9UVt5Hvht5Z3UUpetRf SOsd9pwgq7zrGUL4ecKHQQZBb4/V4FuP8ZE8yyFvC0t7IWhKB14esVsO1hdvPC3QyT X80LXBtn7QDCtXvSHm/gQdOisAAGFVnRelQEM7mNrWTk4tEY3g/S7pfaYvtAOWuSNx lNzg1w/i7mL0RhkX1BCqXUDJjADIXCWShbPCCMK9l3ByUiagwGp6mUp5t+SqjtjBZR lJJCcei2R8CDEyEVhkZhVPNbBIq2sWlL7NAWjUgB3jIrx8hRbj3PUkeyiegtNRM5LS ZBd/z7+9b1tBQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WBm8C0mWWz9rxB; Sun, 30 Jun 2024 12:47:06 +0200 (CEST) In-Reply-To: <87o77i207z.fsf@debian-hx90.lan> (Xiyue Deng's message of "Sun, 30 Jun 2024 03:28:48 -0700") OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288187 Archived-At: Xiyue Deng writes: > Philip Kaludercic writes: > >> Jeremy Bryant writes: >> >>> Xiyue Deng 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