emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to install documentation in sub-directory with Package VC?


From: Philip Kaludercic
Subject: Re: How to install documentation in sub-directory with Package VC?
Date: Tue, 14 Mar 2023 15:56:34 +0000

Okamsn <okamsn@protonmail.com> writes:

> Hello,
>
> I am trying to install a package I wrote using Package VC from Github:
> https://github.com/okamsn/loopy/tree/fix-comp-warnings
>
> The lisp files, which are in the root of the project, are installed, but
> the documentation file "loopy.texi" is in a subfolder "doc":
> https://github.com/okamsn/loopy/tree/fix-comp-warnings/doc
>
> The presence of this file does not trigger the call to makeinfo.
> The function `package-vc--unpack-1` seems to look for the keyword ":doc"
> in the package description or package spec, which I have tried adding to
> the file "loopy-pkg.el" and to the list passed to `package-vc-install`
> as `:doc "doc/loopy.texi"`.

Note that the -pkg.el file is overwritten (as does elpa-admin.el for all
packages on GNU and NonGNU ELPA), as the package metadata is taken from
the main file.

The other issue is that -pkg.el files are used to generate package
descriptors, while :doc is part of the package specification.

> What is the correct way to make Package VC install the documentation
> contained in the sub-folder?

Package-vc uses ELPA package specifications, which you can also pass to
`package-vc-install':

        (package-vc-install '(loopy :url "https://github.com/okamsn/loopy";
                                    :doc "doc/loopy.texi"))

That being said I have found a bug in `package-vc--unpack-1' and
`package-vc--desc->spec' in that it fails to re-locate the
specification.  This is a general problem, whenever packages are
installed with a provided specification.  One trick might be to also
consult `package-vc-selected-packages', but that wouldn't solve the
issue we have here.

I believe a general fix would involve storing new or custom package
specifications in a user option, which probably cannot be
'package-vc-selected-packages', similarly to
`package-selected-packages'.

It is imaginable that we add support for a special file, sort of like
.elpaignore (say .elpaspec.eld), that could also be used to consult this
file.

> Thank you.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]