From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: Subdirectories in package .tar archives Date: Sat, 15 May 2021 22:20:36 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000085fc9d05c264183e" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6002"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 15 22:21:44 2021 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 1li0n9-0001Mm-OG for ged-emacs-devel@m.gmane-mx.org; Sat, 15 May 2021 22:21:43 +0200 Original-Received: from localhost ([::1]:41834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1li0n7-0002gD-So for ged-emacs-devel@m.gmane-mx.org; Sat, 15 May 2021 16:21:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1li0mI-0001q3-Ce for emacs-devel@gnu.org; Sat, 15 May 2021 16:20:50 -0400 Original-Received: from mail-oo1-xc35.google.com ([2607:f8b0:4864:20::c35]:45683) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1li0mG-0000op-Na for emacs-devel@gnu.org; Sat, 15 May 2021 16:20:50 -0400 Original-Received: by mail-oo1-xc35.google.com with SMTP id s1-20020a4ac1010000b02901cfd9170ce2so629928oop.12 for ; Sat, 15 May 2021 13:20:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XdyS9dGks1fmofZFBQ+OjRdkRd8Jn1QcgMq5DmYDZls=; b=uyTbPLwLAttTKA0dKnD3khVQaldiNRANytX1Ifp2PHq5Vwtlwh3M62ru19eTJ5sFc7 CbsIdOPI4AdMD8X/g4mNGKG5le8p+GQ6FRSaMuqzxfxDtwxas9Lt03J3UUNIuZnjcLCs yRS9870tIE6ix4qwWjPZYrFWoJxBlfp021Y1QVqcbJ2ILd9vnB37F3FuM4VPAdqReVg6 aJr9LA4Wc5LJPEfdujhmeoU4IidbfnndRsKNSSBogbY8orxkf7rKfX3ZprwVMt+59UhO Ooww6lEqar/rdKSmEtDDhX+WdP3vY4f7o020gVMUBToIJBS59Ti7I8i26QNLLPBRUUGo zdig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XdyS9dGks1fmofZFBQ+OjRdkRd8Jn1QcgMq5DmYDZls=; b=fRRm3kzFfo1YW/gaEDA0sNzsnmpSMGYzDRMCMOOOq5koktUdKDK7gYGqpx35Cv6EBR ktwkh18mvE8rAkNs4eiMAVuOzTfAxlQWUyCOmrPSIsKLKuZPLzeEju6mzjcfXZWVUegH 1S+TMKaywJ6Ewj4wBYkfzKxoWLD6OTjiiGL+uoS+Kzk7EmL5ZOf/U8cyEO3jJEoeLZCH XI9ImqlF2cJx/Mfd50PMr+elG7NoP8e53xvrzIyrMn7JbsUqR5Jd8bSxSqlNiE1LZbiv PXeYlyJt0FWXjP/T/1z50uMua5CxEVK9xkxzKjO68jDCULxR0lCu/H1+GXKtp8IIKP9R ykTQ== X-Gm-Message-State: AOAM532m39asqeXSRjw4UeqG/0a2DI55UtsZu5NV1XUJVuN0mKWITgDp gduTdYiOgi7eAMImWEHuyVlydEFQ+Sy7IMdLIQ== X-Google-Smtp-Source: ABdhPJymB8iw4/Bju2DjGZ/1ApIjz/0C7Rxu09SCGAxCo3K1545c0WHkGI8d+hsVJ7glrAOrJkBkQmm5sSLSniBKuUw= X-Received: by 2002:a4a:ab04:: with SMTP id i4mr11468138oon.56.1621110047504; Sat, 15 May 2021 13:20:47 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::c35; envelope-from=pogonyshev@gmail.com; helo=mail-oo1-xc35.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 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" Xref: news.gmane.io gmane.emacs.devel:269318 Archived-At: --00000000000085fc9d05c264183e Content-Type: text/plain; charset="UTF-8" Thank you. So, basically for *resource* files (i.e. not Elisp) and something unrelated to Info there are no real reasons to avoid subdirectories, right? As long as one can generate packages as expected (probably not with MELPA, though maybe there is some hidden feature in it for this), they will work fine and one could e.g. do something like `(defvar ... (somehow-load-resource "foo/bar.baz"))'? Paul On Sat, 15 May 2021 at 21:40, Stefan Monnier wrote: > > is it possible/well-defined to have subdirectories in Elisp packages? > > Yes. > > > E.g. in MELPA documentation I see that "Any file specified at any > > path in the repository is copied to the root of the package". > > Is there a good reason for it, or is it rather a limitation of MELPA? > > It's a limitation of MELPA linked to a limitation of ELPA. > IIRC the main limitation in this respect in ELPA is that the > `-autoloads.el` file created during installation only collects > autoload cookies from .el files in the package's main directory. > Another related one is that the package's Texinfo doc is expected to > come with the `.info` and a `dir` files in the root dir. > > You can partly circumvent those issues if you create your own autoloads > file somehow (either before packaging the tarball, or as part of the > byte-compilation performed after installation) and/or set the > `Info-directory-list` yourself (from the autoloads file, presumably). > > > Stefan > > --00000000000085fc9d05c264183e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you. So, basically for *resource* files (i.e. not El= isp) and something unrelated to Info there are no real reasons to avoid sub= directories, right? As long as one can generate packages as expected (proba= bly not with MELPA, though maybe there is some hidden feature in it for thi= s), they will work fine and one could e.g. do something like `(defvar ... (= somehow-load-resource "foo/bar.baz"))'?

Pa= ul

On Sat, 15 May 2021 at 21:40, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
=
> is it possible/well-= defined to have subdirectories in Elisp packages?

Yes.

> E.g.=C2=A0 in MELPA documentation I see that "Any file specified = at any
> path in the repository is copied to the root of the package".
> Is there a good reason for it, or is it rather a limitation of MELPA?<= br>
It's a limitation of MELPA linked to a limitation of ELPA.
IIRC the main limitation in this respect in ELPA is that the
`<pkg->-autoloads.el` file created during installation only collects<= br> autoload cookies from .el files in the package's main directory.
Another related one is that the package's Texinfo doc is expected to come with the `.info` and a `dir` files in the root dir.

You can partly circumvent those issues if you create your own autoloads
file somehow (either before packaging the tarball, or as part of the
byte-compilation performed after installation) and/or set the
`Info-directory-list` yourself (from the autoloads file, presumably).


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--00000000000085fc9d05c264183e--