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.bugs Subject: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Sat, 13 May 2023 17:14:13 +0000 Message-ID: <87zg68887u.fsf@posteo.net> References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <875y8waaj4.fsf@posteo.net> <87r0rkrxra.fsf@breatheoutbreathe.in> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29812"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63337@debbugs.gnu.org To: Joseph Turner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 13 19:15:31 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pxsqA-0007YA-Co for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 May 2023 19:15:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxspm-0000QI-I6; Sat, 13 May 2023 13:15:06 -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 1pxspk-0000Q4-2X for bug-gnu-emacs@gnu.org; Sat, 13 May 2023 13:15:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pxspj-00018B-Pk for bug-gnu-emacs@gnu.org; Sat, 13 May 2023 13:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pxspi-0002Wa-IX for bug-gnu-emacs@gnu.org; Sat, 13 May 2023 13:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 May 2023 17:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63337 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63337-submit@debbugs.gnu.org id=B63337.16839980639643 (code B ref 63337); Sat, 13 May 2023 17:15:02 +0000 Original-Received: (at 63337) by debbugs.gnu.org; 13 May 2023 17:14:23 +0000 Original-Received: from localhost ([127.0.0.1]:39482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxsp4-0002VS-QU for submit@debbugs.gnu.org; Sat, 13 May 2023 13:14:23 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:49175) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxsp2-0002VD-2z for 63337@debbugs.gnu.org; Sat, 13 May 2023 13:14:21 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1EFBE240105 for <63337@debbugs.gnu.org>; Sat, 13 May 2023 19:14:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683998054; bh=OkYKLU3Y3Vt3zFjX6kwpnJuKsw3oaPS3T7E6t0bm4iQ=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=lBuzu3sF/dR8XfmBboQWbrPWdsUptIURwvh0Ika69ErTuVhrH9hT21hh/V2I+imdg lhAFvq8R7JzYWywGVHuTzaXURiIuke9RORrRh6ctb4UtVZI79SXmAbs91gcNYcI8+r WyRg/utd3xAqyAXlQfBHHJyvrXrGFWwZc4Ky+IqvDsVNeW91O4dxELBAjDt3wBaWYJ g6FO7lAWNRMgZLNvOpluQzG/XABYKhjzSShRkuSByv03wL8WHSS1HcKscnIMQW8FO7 bR5lS7q3n+JoxMh/U/BHbhe9xcJUYHEtGq7gDUlnrVXBEjy5+3lhORRPLexdFRGpcb uhJ3jA8fvlrHQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QJXKx44qtz9rxK; Sat, 13 May 2023 19:14:13 +0200 (CEST) In-Reply-To: <87r0rkrxra.fsf@breatheoutbreathe.in> (Joseph Turner's message of "Sat, 13 May 2023 09:38:11 -0700") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:261691 Archived-At: Joseph Turner writes: > Philip Kaludercic writes: > >> Joseph Turner writes: >> >>> Philip Kaludercic writes: >>> >>>> Joseph Turner writes: >>>> >>>>> Hello! >>>>> >>>>> Because package-vc--build-documentation exports the texinfo manual to a >>>>> temp file inside /tmp/ , any @include statements with relative paths >>>>> break the makeinfo call. >>>>> >>>>> I noticed this issue when attempting to use package-vc to install >>>>> org-transclusion, whose manual contains the line >>>>> >>>>> #+texinfo: @include fdl.texi >>>>> >>>>> See: https://raw.githubusercontent.com/nobiot/org-transclusion/main/docs/org-transclusion-manual.org >>>>> >>>>> The attached patch solves this problem by passing the -I flag to >>>>> makeinfo. From makeinfo --help: >>>>> >>>>> -I DIR append DIR to the @include search path. > >>>> According to the docs, makeinfo has -I to append the search path, and -P >>>> to prepend. I don't know how well either of the two are supported, but >>>> assuming they are, shouldn't -P be preferred? Or wouldn't it have any >>>> effect? >>> >>> I am not sure what difference it would make. I don't know if the default >>> @include search path includes anything besides the working directory. >>> >>> In the attached diff, I have changed -I to -P. >> >> I can confirm that this patch does the right thing, and I think we >> should apply it. > > I think Eli suggested we prepend (-I) instead of append (-P), as in the > very first patch I sent, also attached here. I did not understand the argument, but it probably does not matter that much. As this patch has Eli's blessing, I will apply it. > From a41abce88ed3b833c5531208945474c9cd16284b Mon Sep 17 00:00:00 2001 > From: Joseph Turner > Date: Sat, 6 May 2023 14:49:43 -0700 > Subject: [PATCH] Fix: (package-vc--build-documentation) Relative @include > statements > > --- > lisp/emacs-lisp/package-vc.el | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el > index 489610e2a1e..63c10285ca7 100644 > --- a/lisp/emacs-lisp/package-vc.el > +++ b/lisp/emacs-lisp/package-vc.el > @@ -381,6 +381,7 @@ FILE can be an Org file, indicated by its \".org\" extension, > otherwise it's assumed to be an Info file." > (let* ((pkg-name (package-desc-name pkg-desc)) > (default-directory (package-desc-dir pkg-desc)) > + (docs-directory (expand-file-name (file-name-directory file))) > (output (expand-file-name (format "%s.info" pkg-name))) > clean-up) > (when (string-match-p "\\.org\\'" file) > @@ -395,7 +396,9 @@ otherwise it's assumed to be an Info file." > (erase-buffer) > (cond > ((/= 0 (call-process "makeinfo" nil t nil > - "--no-split" file "-o" output)) > + "-I" docs-directory > + "--no-split" file > + "-o" output)) > (message "Failed to build manual %s, see buffer %S" > file (buffer-name))) > ((/= 0 (call-process "install-info" nil t nil