From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: How to install documentation in sub-directory with Package VC? Date: Tue, 14 Mar 2023 15:56:34 +0000 Message-ID: <87bkkvconh.fsf@posteo.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39576"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Okamsn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 14 16:57:12 2023 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 1pc71U-000A7r-0S for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Mar 2023 16:57:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pc70f-00080q-Fh; Tue, 14 Mar 2023 11:56:21 -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 1pc70Z-00080R-Gv for emacs-devel@gnu.org; Tue, 14 Mar 2023 11:56:15 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pc70X-00028h-Fm for emacs-devel@gnu.org; Tue, 14 Mar 2023 11:56:15 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 7DD4C2408EB for ; Tue, 14 Mar 2023 16:56:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1678809371; bh=PCZTGaP9L/f1lMhZuRx89sj4YaiJJIIhyHIIgU0QwN4=; h=From:To:Cc:Subject:Date:From; b=onp2E+oix5YVu4MQaG3dC5mi2Leir+S0m5O+CIcSuVWYn4LZM3UP0BDo7m/4KGJh4 nrrKKIJwFvVXVMI1Q3fgLBRNMY0Z2HXprmauIAajNQ9RG8wmmjt0eAMaSMM3RGucCo 6QU0FfjVSgK5dso5lNI54hj9SIDhLnjgOjDyF8QbjzB4iAsYdEFLgspYrtjXsyn6xQ +xgUy+tKjjI4rtDqnELPyLngUG+3pFy2gtkw3nU7NeBbEOnY0TsUx+1K0AQUWaQ3NN eN4FtYSj49I6rHZTpKdvMpMESN2bmNCwc+QsNbfLc/qEVoulIe+LUDOdG60wiwYYfy GUcwNMdDx2rUA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PbdRb0QkRz9rxP; Tue, 14 Mar 2023 16:56:10 +0100 (CET) In-Reply-To: (okamsn@protonmail.com's message of "Tue, 14 Mar 2023 03:13:11 +0000") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-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:304447 Archived-At: Okamsn 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.