unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Subdirectories in package .tar archives
@ 2021-05-15 18:02 Paul Pogonyshev
  2021-05-15 19:40 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Pogonyshev @ 2021-05-15 18:02 UTC (permalink / raw)
  To: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 340 bytes --]

Hi,

is it possible/well-defined to have subdirectories in Elisp packages?  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?  Is it possible to group
resource files in subdirectories?

Paul

[-- Attachment #2: Type: text/html, Size: 395 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Subdirectories in package .tar archives
  2021-05-15 18:02 Subdirectories in package .tar archives Paul Pogonyshev
@ 2021-05-15 19:40 ` Stefan Monnier
  2021-05-15 20:20   ` Paul Pogonyshev
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2021-05-15 19:40 UTC (permalink / raw)
  To: Paul Pogonyshev; +Cc: Emacs developers

> 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
`<pkg->-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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Subdirectories in package .tar archives
  2021-05-15 19:40 ` Stefan Monnier
@ 2021-05-15 20:20   ` Paul Pogonyshev
  2021-05-15 21:42     ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Pogonyshev @ 2021-05-15 20:20 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs developers

[-- Attachment #1: Type: text/plain, Size: 1483 bytes --]

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 <monnier@iro.umontreal.ca>
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
> `<pkg->-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
>
>

[-- Attachment #2: Type: text/html, Size: 1924 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Subdirectories in package .tar archives
  2021-05-15 20:20   ` Paul Pogonyshev
@ 2021-05-15 21:42     ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2021-05-15 21:42 UTC (permalink / raw)
  To: Paul Pogonyshev; +Cc: Emacs developers

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

Yup.

> As long as one can generate packages as expected (probably not with
> MELPA, though maybe there is some hidden feature in it for this),

I don't know, but at least the specs used for GNU ELPA packages are
definitely able to generate tarballs with subdirectories.
I'd expect the same holds for MELPA.

> they will work fine and one could e.g. do something like
> `(defvar ... (somehow-load-resource "foo/bar.baz"))'?

Yes.


        Stefan




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-15 21:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15 18:02 Subdirectories in package .tar archives Paul Pogonyshev
2021-05-15 19:40 ` Stefan Monnier
2021-05-15 20:20   ` Paul Pogonyshev
2021-05-15 21:42     ` Stefan Monnier

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