unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Joseph Turner <joseph@breatheoutbreathe.in>
Cc: help-gnu-emacs@gnu.org,  Ruijie Yu <ruijie@netyu.xyz>
Subject: Re: package-vc-install fails to build docs
Date: Sun, 23 Apr 2023 12:37:38 +0000	[thread overview]
Message-ID: <877cu293l9.fsf@posteo.net> (raw)
In-Reply-To: <877cu3o6ld.fsf@breatheoutbreathe.in> (Joseph Turner's message of "Sat, 22 Apr 2023 15:56:09 -0700")

Joseph Turner <joseph@breatheoutbreathe.in> writes:

> Thank you Ruijie Yu and Philip Kaludercic for your help!
>
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Ruijie Yu via Users list for the GNU Emacs text editor
>> <help-gnu-emacs@gnu.org> writes:
>>> I'm looking at the package-vc source code, and it doesn't seem to try to
>>> autodetect any doc files at the moment.  Try adding `:doc` in your
>>> `package-vc-install' call and see if anything changes.
>
> Actually, it looks like extra plist elements like :doc are stripped away
> in package-vc--unpack. package-vc--unpack doesn't pass its pkg-spec arg
> along to package-vc--unpack-1. package-vc--unpack-1 then calls
> package-vc--desc->spec, which gets the spec anew from ELPA IIUC.
>
> Regardless, I believe the issue lies elsewhere, see below.
>
>> Right, if you just pass a URL, then package-vc has no metadata.  But
>> since org-transclusion is on ELPA, you can invoke it like this:
>>
>>   (package-vc-install 'org-transclusion)
>>
>> then it should re-use the package specification that GNU ELPA provides.
>> If you invoke package-vc-install interactively, it would also prompt you
>> with this package name.
>>
>> That being said, I just tried it out and it seems that it still doesn't
>> work because of a discrepancy between the package specification on ELPA
>> that mentions docs/org-transclusion.org to be the documentation file
>>
>>  (org-transclusion	:url "https://github.com/nobiot/org-transclusion"
>>   :make "org-transclusion.org"
>>   :doc "docs/org-transclusion.org"
>>   :readme "README.org")
>>
>> and as you say the fact that the actual manual lies in
>> docs/org-transclusion-manual.org.  But this is an issue that should
>> either be fixed in ELPA if the maintainer wishes this file to be used,
>> or upstream if this is a mistake.
>
> nobiot (org-transclusion author) points out here
> https://github.com/nobiot/org-transclusion/issues/182#issuecomment-1518676316
> that docs/org-transclusion.org needs to be generated from
> docs/org-transclusion-manual.org according to
>
> :make "org-transclusion.org"
>
> (search for ":make" in
> https://git.savannah.gnu.org/cgit/emacs/elpa.git/plain/README )
>
> It appears that package-vc hasn't been taught to make use of the :make
> package spec key. A quick search inside of
> https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/elpa-packages#n491
> reveals only two other packages besides org-transclusion that use it.

You are right (and I totally missed the :make entry in the specification
above).  Package-vc did intentionally NOT add :make or :shell-command
support, for the sake of user safety.  It wouldn't be difficult to
implement this, if we could find a way to make it reasonably safe
(e.g. if the user has to opt-in or we trust package specifications if
they were delivered by a trusted package archive).

>>> I'm on recent master, what is your Emacs version?
>
> GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30,
> cairo version 1.16.0)
>
> In conclusion, I think the issue is that package-vc doesn't yet support
> the package spec :make key.
>
> Cheers,
>
> Joseph



  reply	other threads:[~2023-04-23 12:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-22  5:34 package-vc-install fails to build docs Joseph Turner
2023-04-22  6:07 ` Ruijie Yu via Users list for the GNU Emacs text editor
2023-04-22  7:27   ` Philip Kaludercic
2023-04-22 22:56     ` Joseph Turner
2023-04-23 12:37       ` Philip Kaludercic [this message]
2023-04-23 16:54         ` Joseph Turner
2023-04-23 18:36           ` Philip Kaludercic
2023-04-23 20:20             ` Joseph Turner
2023-04-24  5:54               ` Philip Kaludercic
2023-04-28 19:42                 ` Joseph Turner
2023-04-28 21:17                   ` Philip Kaludercic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877cu293l9.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=help-gnu-emacs@gnu.org \
    --cc=joseph@breatheoutbreathe.in \
    --cc=ruijie@netyu.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).