From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Question regarding load-path handling for ELPA packages Date: Wed, 22 May 2024 17:53:28 +0200 Message-ID: <87bk4xvo5j.fsf@web.de> References: <878r0ifjmt.fsf@debian-hx90.lan> <87eda0765g.fsf@debian-hx90.lan> <87o794z6l8.fsf@web.de> <87a5ko6s64.fsf@debian-hx90.lan> <87bk53cfo2.fsf@web.de> <87h6eu5kfa.fsf@debian-hx90.lan> <87jzjpsgsw.fsf@web.de> <87ikz93tlh.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="34791"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Michael Heerdegen via "Emacs development discussions." To: Xiyue Deng Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 22 17:53:48 2024 Return-path: Envelope-to: ged-emacs-devel@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 1s9oHk-0008sh-6L for ged-emacs-devel@m.gmane-mx.org; Wed, 22 May 2024 17:53:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9oGq-0007Cg-P6; Wed, 22 May 2024 11:52:52 -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 1s9oGo-0007CT-Oz for emacs-devel@gnu.org; Wed, 22 May 2024 11:52:50 -0400 Original-Received: from mout.web.de ([212.227.15.3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9oGk-0001mi-FH for emacs-devel@gnu.org; Wed, 22 May 2024 11:52:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1716393164; x=1716997964; i=michael_heerdegen@web.de; bh=cx9x5xHd9OAWtB6mdHKMtAZVnSZbruKj0uxNBaLEweY=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=ohR3GO5t3C8qpIi6XgCSfMpGq45dmChrK5VZJjgL5hOp/EDU7tABabO4s2Y6eZbx 7qDe1hyypXgjTFB0JFqib8wlhqC2lDe3815Jx3YrJq+W0FSUy10CvEACwFoz+V0tj 24lZOvqRqLuKlVnxAcNOI7KgyTDI6ih5hO+CXULhCHyhPAezftQ/Tpv8mpwri4Dyu Bf3GfZaM9Du4oBsa5iOm3INsHEhw0yVHDBGzBeVcQkV+1r3aoWptpmSVSfKE+JUCe Zu7wDZm76wGjyrOjfKQ/BmzyBdJtWRLxehgnkuVOLYb983MLQEvf4w+F1O5iZx3CZ +Cf3pnUJ1hFh1lTV0g== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([84.59.210.113]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1M6YNJ-1sCHFF08Sn-00HKMf; Wed, 22 May 2024 17:52:44 +0200 In-Reply-To: <87ikz93tlh.fsf@debian-hx90.lan> (Xiyue Deng's message of "Sun, 19 May 2024 23:06:34 -0700") X-Provags-ID: V03:K1:b4P6n2BGhfjC9Gzkw9s1gXP4483s+ENZ9zzOFBG+CWgnIzEWyZ9 tr+U34LqUNadNZho9R7jP2aHPHbxpW2n+mOi0RqltNGmgCn6ArlBWgWS6yzzmKGHuQfF71k seV9ZIS1JlKjBknp1eYJVAtNVmSCog10MCy2psPBmRc+QTNN9+/BthGAm+MCGSrZbrus8da u2/7Lm6jadkQ8dserMfbw== UI-OutboundReport: notjunk:1;M01:P0:F8cqMgqeGLw=;vdElGzSjtd5kRvDhD23Quewd6Uk ntwDHx3sZsihW6/gI/M545qiLnL2Lg0rWmt2yxiO26CL0/5LIQJfZSwRmYwV/wKPsMw3bmhq7 h0wLIbPJDNwGvX1XkXk4oi1bGZeeIBxxc4pxOdTnkOY0F7nNIK68Uv7q/BpMMwyV9f+B5koQM JNHFr3geE/gp6MH5u2azFK4FBj4/hfvBVUBxy7XZ3Z5aGE3O7GHGJyuUnK3s7lQcNAffKMAro OmrUlcnjnErlHL5RxccDBfi81VRprNpU0LGsKQtFpthbl0/Of+9BSJS+bc5IQS/SqAwk0bXj7 81DCoNEEyaeJPUFJ9YUIXRMemv4eHJ7rswJNXOOybd1jFz1bcvpC20DAYbIfaGua/XC8me2jo S+7TAZk7AnYQb23TlsCVsrC8Nmx0CI4WVXNj/b1stLLwnTBspIc2073wN4zIuCj0S6p7dnYUF yHvC8M8PVVeDtCU6qCsfLvMzRHABo/PcSkAQUO/lpa+08DhdfQTJ8mY4LHFfi4/M9VgTPVz/V fY0RpZi6Z4L2A+tVFwxgEIJBMjrKalISe9ziArgiQ4eJyN6U1kAaJmTYd95ME1lfBxW6usOin p54y3fjR6TScvBHSYC+twlnIH+ZKMyBUv3I6MBtpphimDIUli6ZqOc41asLGpd+eGwr5oy59S wsL7Tmk8REInvorj0pRc2NeVn1h90xfHaM61E8+GvIGl+NshfZCfTD4IBQgHFGvL/Fotrt3JO qMAwQCaCI4xF49TVQxFbJRzNyfrN93Ph4WM4wuUsC/KpHXRL5EG0MAWnzd27agbvumhCGaEP Received-SPF: pass client-ip=212.227.15.3; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:319485 Archived-At: Xiyue Deng 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.