From debbugs-submit-bounces@debbugs.gnu.org Sat May 06 17:52:38 2023 Received: (at submit) by debbugs.gnu.org; 6 May 2023 21:52:38 +0000 Received: from localhost ([127.0.0.1]:35907 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvPpW-0000sZ-6e for submit@debbugs.gnu.org; Sat, 06 May 2023 17:52:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:39280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvPpT-0000sN-Gh for submit@debbugs.gnu.org; Sat, 06 May 2023 17:52:36 -0400 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 1pvPpT-0007DF-B1 for bug-gnu-emacs@gnu.org; Sat, 06 May 2023 17:52:35 -0400 Received: from out-15.mta1.migadu.com ([2001:41d0:203:375::f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvPpQ-0004i2-Ik for bug-gnu-emacs@gnu.org; Sat, 06 May 2023 17:52:35 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1683409948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=fu6G2H3X9xwc5BwGgWIYi40djzBP4kjA+aGoPWsqOi8=; b=mWirboyxnp9tgzPrlu8f4E8BTFPaLxeaDTzBKXpGeh4JWll/JiA0u2lVmJkKbAXWUWjPx4 h3QZ19cy7SMKns0scdNa5ef34Xk7aMA462zkZsWh472m7EaENs1+emMbbYzwixPiDGLgN7 f86B5xcx/KL/1S+mcFQtZJ6nSikDJ0A= From: Joseph Turner To: bug-gnu-emacs@gnu.org Subject: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Sat, 06 May 2023 13:54:49 -0700 X-Debbugs-CC: Philip Kaludercic Message-ID: <87fs89qg9y.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:203:375::f; envelope-from=joseph@breatheoutbreathe.in; helo=out-15.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain 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. Best, Joseph --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-package-vc-build-documentation-Relative-include-.patch >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 -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 05:58:32 2023 Received: (at 63337) by debbugs.gnu.org; 7 May 2023 09:58:32 +0000 Received: from localhost ([127.0.0.1]:36515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvb9z-0005B3-MO for submit@debbugs.gnu.org; Sun, 07 May 2023 05:58:32 -0400 Received: from mout01.posteo.de ([185.67.36.65]:45819) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvb9u-0005Am-Sr for 63337@debbugs.gnu.org; Sun, 07 May 2023 05:58:30 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id AD2E924010D for <63337@debbugs.gnu.org>; Sun, 7 May 2023 11:58:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683453500; bh=ecQgixmZUq9iT57EuiFoSb1W7pLHN+SmiS97ooR3AsI=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=GCxr/oq3FTagI/k83jbl7kBxIAX7jnd4l05+u+nbYiNRbaJh0jfJnZMu7efssiDSn ejIjzJYz3I4+FkzcUC8fn8xgDriU9Vdl+G1OS5IjnoutNb9sAcGzI4XQ5RJgtYfNlU 1w3iPdmSDrLdTgAEPvgoJ8YfT0jDpJpJBWldZEQCE5gL7UUvSRt16vNugskvwoAS0D PsEyqYqxgokGvelVBKsNVsdlqD4UFIhR5LQTvlJ7KsFDBDJeMtdsamSvSoNNt9JM5V 246QqlI8dajeTmJbEw8FGIB6FTmPBv5zLkco+Ukm/JDkmCBrKW1fgcPSel+l8xs2Gv rJIukqQiwv+rw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QDfxl6Mp0z9rxD; Sun, 7 May 2023 11:58:19 +0200 (CEST) From: Philip Kaludercic To: Joseph Turner Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements In-Reply-To: <87fs89qg9y.fsf@breatheoutbreathe.in> (Joseph Turner's message of "Sat, 06 May 2023 13:54:49 -0700") References: <87fs89qg9y.fsf@breatheoutbreathe.in> 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 Date: Sun, 07 May 2023 09:58:19 +0000 Message-ID: <87cz3cea4k.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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. Good catch, this should be applied to emacs-29. > Best, > > Joseph > > 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 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? > + "--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 -- Philip Kaludercic From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 06:55:28 2023 Received: (at 63337) by debbugs.gnu.org; 7 May 2023 10:55:28 +0000 Received: from localhost ([127.0.0.1]:36576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvc36-0006ss-0W for submit@debbugs.gnu.org; Sun, 07 May 2023 06:55:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvc33-0006se-Pb for 63337@debbugs.gnu.org; Sun, 07 May 2023 06:55:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvc2w-0003FY-8T; Sun, 07 May 2023 06:55:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=jI+E+NN2Na7ypcdKY9HaNGe3VJtCqrXLOhtSBJWVdWI=; b=cH+3ogRo3qVp A7eIVosl8yU3kB4hatotCiWNnn0plL/CVYx343qYBzlGYtJwmtYk2vgJeMfbSywSoBqKSX1mBk4zo 9YKSHLG1ViHNwtTgcs3Gg7d0xPUt6Q/O8cxfYV8J3HjRyRECrXI/YnwZTji86n0eTThH9qwSfX1OZ cuZrn42RttTb6qSHpS0l9zz8oqKzybU3h+X76QgnJD9nxvBDBM0nF1xjaSh39mlK9gDhca0X9BBhi SaTlffhgJ5sPCdsqb4e6cDtUi4LEbSYMDiL8biVfQlt9N3UubNzvSoAzpMcf8gZRpmIlXBRGzl/RI TUOegVdRKzC2KtasPa9Fbw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvc2q-0008Jq-76; Sun, 07 May 2023 06:55:14 -0400 Date: Sun, 07 May 2023 13:56:10 +0300 Message-Id: <83lei0e7g5.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <87cz3cea4k.fsf@posteo.net> (message from Philip Kaludercic on Sun, 07 May 2023 09:58:19 +0000) Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, joseph@breatheoutbreathe.in X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 63337@debbugs.gnu.org > From: Philip Kaludercic > Date: Sun, 07 May 2023 09:58:19 +0000 > > 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. > > Good catch, this should be applied to emacs-29. Fine by me. From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 14:45:56 2023 Received: (at 63337) by debbugs.gnu.org; 7 May 2023 18:45:56 +0000 Received: from localhost ([127.0.0.1]:38488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvjON-0000BL-L7 for submit@debbugs.gnu.org; Sun, 07 May 2023 14:45:56 -0400 Received: from out-5.mta1.migadu.com ([95.215.58.5]:43018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvjOK-0000BC-QX for 63337@debbugs.gnu.org; Sun, 07 May 2023 14:45:54 -0400 References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1683485151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7dcsEc9gu/y/l3RjELh3iakGGV7as6jDSieAGaLohD8=; b=jzTSRsKZMb78W+h0t5GmYFVEhG3LZPIPkqz4o1Im+Sx69CPnE2V1t95jOOlcv9zAO5xqmJ ajH4aI+V22rIUkYtVLhaWXa7neOSBVeVvGp+dtiqoJTMqs2yFnULL7JBFLA2q+25gzF8fF gNXr7GUSCDFy8KvUtDcwx84nHypY3pg= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Joseph Turner To: Philip Kaludercic Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Sun, 07 May 2023 11:40:46 -0700 In-reply-to: <87cz3cea4k.fsf@posteo.net> Message-ID: <87pm7c7zfs.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain 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. > > Good catch, this should be applied to emacs-29. > >> Best, >> >> Joseph >> >> 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 > > 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. >> + "--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 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-package-vc-build-documentation-Relative-include-.patch >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)) + "-P" 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 -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 15:10:20 2023 Received: (at 63337) by debbugs.gnu.org; 7 May 2023 19:10:20 +0000 Received: from localhost ([127.0.0.1]:38518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvjm0-000102-Ez for submit@debbugs.gnu.org; Sun, 07 May 2023 15:10:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvjlx-0000zm-Oj for 63337@debbugs.gnu.org; Sun, 07 May 2023 15:10:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvjls-0008GF-CS; Sun, 07 May 2023 15:10:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=FaM34/aBdi/cAfvdQRO4EXAGiIl1pH3Gp9i/vT1Osek=; b=i29N+uVwtd0I 7x5Cy12bBM/RD569RbJkSAEC+yJ7uFT1skKSla0ElU+9CZ82z1CuOS4GEkxfunrNTiIbzv4ay2x3s QEg7B2HnU+vYcdPlQoWIKiKaUxaENjWIykPdrNfetCCQW/XafVvsm7lyO1n9GO8QPKCGyl0xcQuda dezwr1pTAao0fphjLGj+9H13rn0J4FtU9/YzdFWvDWhi2TAiOpXqQeGIKWJfaULEpcdDHQ/oWNjEu vI6J5nxDBWiIhImo/WBr3M/EYH5x9sK/8ec6Im8WzHMNoQarGz6+NBW2f9Timpsq+MGqImI/Y6VDt TI9c4Urz2r3vZlCLuFSVvQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvjlr-0000iV-S5; Sun, 07 May 2023 15:10:12 -0400 Date: Sun, 07 May 2023 22:11:10 +0300 Message-Id: <83zg6gc5yp.fsf@gnu.org> From: Eli Zaretskii To: Joseph Turner In-Reply-To: <87pm7c7zfs.fsf@breatheoutbreathe.in> (bug-gnu-emacs@gnu.org) Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, philipk@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 63337@debbugs.gnu.org > Date: Sun, 07 May 2023 11:40:46 -0700 > From: Joseph Turner via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > > 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. It doesn't, according to the Texinfo manual. Only the current directory is searched. > In the attached diff, I have changed -I to -P. I think it's a mistake: the current directory should searched first. So -I is better. From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 15:19:52 2023 Received: (at 63337) by debbugs.gnu.org; 7 May 2023 19:19:52 +0000 Received: from localhost ([127.0.0.1]:38524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvjvE-0001Dh-IG for submit@debbugs.gnu.org; Sun, 07 May 2023 15:19:52 -0400 Received: from mout01.posteo.de ([185.67.36.65]:49699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvjvD-0001DS-AG for 63337@debbugs.gnu.org; Sun, 07 May 2023 15:19:52 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 71E3124017F for <63337@debbugs.gnu.org>; Sun, 7 May 2023 21:19:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683487185; bh=+QsxMS4o9JiyW1p5kyXkgg1zer+EN1HhBMignovghRw=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=UWZ1tDvLjlzlOx5eSyXf0HYRT2s9WHju+7d4jTvSlyvZ4F0kOItM/lYASfRq7ifuF VF389ziPMNNSioqSAu29ANpJgv2F75iuQ3LADPseUnVVLUSSNkmguIQL9ASigRjhoO cDqPcSciAmuSHWP8GJRltKd0ZSLZpYC6lolJqNjzo+J8ztC2my95Ix6+yWQB/YEtSs M8TjzLE+7WYq7hvrrzaL9f6DohRr4O8sD821q6+ReDMU1i20n8WLdzp264/ZiRetHE 0dxiJmrUMdEuJWUfEZwwc/eK12ub8z4sI/NiAdhozt7ZDe/O6tqzytqgII03nR4xm/ 0uzyOEejvkseg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QDvPX4nx4z9rxL; Sun, 7 May 2023 21:19:44 +0200 (CEST) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements In-Reply-To: <83zg6gc5yp.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 07 May 2023 22:11:10 +0300") References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> 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 Date: Sun, 07 May 2023 19:19:43 +0000 Message-ID: <87sfc8gd9s.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, Joseph Turner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> Cc: 63337@debbugs.gnu.org >> Date: Sun, 07 May 2023 11:40:46 -0700 >> From: Joseph Turner via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> > 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. I don't know that either, and I can imagine that certain versions of makeinfo might be patched or this could change in the future. > It doesn't, according to the Texinfo manual. Only the current > directory is searched. > >> In the attached diff, I have changed -I to -P. > > I think it's a mistake: the current directory should searched first. > So -I is better. What do we mean by the current directory? When building the manual from an org-file, we switch to a temporary directory (where the .org -> .texi conversion is stored), so the "actual" directory is not the same as the default-directory. From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 16:54:43 2023 Received: (at 63337) by debbugs.gnu.org; 7 May 2023 20:54:44 +0000 Received: from localhost ([127.0.0.1]:38585 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvlP1-0003vl-9U for submit@debbugs.gnu.org; Sun, 07 May 2023 16:54:43 -0400 Received: from out-22.mta1.migadu.com ([95.215.58.22]:59033) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvlOy-0003vH-De for 63337@debbugs.gnu.org; Sun, 07 May 2023 16:54:41 -0400 References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1683492879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EsGwYCXZZ35233QucPp6cqdY/u9jH+EDlCa4EPwSzTI=; b=TfraJyzJBi0wt3dTj14ex48A1HWXoACJnWZlkYH3+qWi5M1ucqmnoTcuO7Id9gIWiTJ1KJ 9T6eATqPDKO1231lb98GwFKzKohhI6e3qVl8sqdUTdYw+o/2LBMgLgP8fpPD7URMld7nyP m3i2GO3rY/jG5Uly/k4WLfUiGsc4a0w= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Joseph Turner To: Philip Kaludercic Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Sun, 07 May 2023 13:29:53 -0700 In-reply-to: <87sfc8gd9s.fsf@posteo.net> Message-ID: <87fs877tgz.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Philip Kaludercic writes: > Eli Zaretskii writes: > >>> Cc: 63337@debbugs.gnu.org >>> Date: Sun, 07 May 2023 11:40:46 -0700 >>> From: Joseph Turner via "Bug reports for GNU Emacs, >>> the Swiss army knife of text editors" >>> >>> > 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. > > I don't know that either, and I can imagine that certain versions of > makeinfo might be patched or this could change in the future. > >> It doesn't, according to the Texinfo manual. Only the current >> directory is searched. >> >>> In the attached diff, I have changed -I to -P. >> >> I think it's a mistake: the current directory should searched first. >> So -I is better. > > What do we mean by the current directory? When building the manual from > an org-file, we switch to a temporary directory (where the .org -> .texi > conversion is stored), so the "actual" directory is not the same as the > default-directory. AFAICT, makeinfo searches the default-directory. See attached patch, where we let-bind default-directory to the docs-directory. In this case, neither -I nor -P is necessary. It's a bit strange to let-bind default-directory twice in the same function, but we can't bind it at the top of the function, the insert-file-contents expects default-directory to be package-desc-dir. Joseph --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-package-vc-build-documentation-Relative-include-.patch >From 7ddfd7ab08820eef159b21047194aaaf4c8841f7 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 | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 476c38916a8..c25a96ed942 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -377,6 +377,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) @@ -389,16 +390,18 @@ otherwise it's assumed to be an Info file." (setq clean-up t))) (with-current-buffer (get-buffer-create " *package-vc doc*") (erase-buffer) - (cond - ((/= 0 (call-process "makeinfo" nil t nil - "--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 - output (expand-file-name "dir"))) - (message "Failed to install manual %s, see buffer %S" - output (buffer-name))) - ((kill-buffer)))) + (let ((default-directory docs-directory)) + ;; `let'-bind `default-directory' so that makeinfo resolves + ;; relative @include statements in the docs directory + (cond + ((/= 0 (call-process "makeinfo" nil t nil "--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 + output (expand-file-name "dir"))) + (message "Failed to install manual %s, see buffer %S" + output (buffer-name))) + ((kill-buffer))))) (when clean-up (delete-file file)))) -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 09:51:33 2023 Received: (at 63337) by debbugs.gnu.org; 8 May 2023 13:51:33 +0000 Received: from localhost ([127.0.0.1]:39615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw1H3-0005nl-3l for submit@debbugs.gnu.org; Mon, 08 May 2023 09:51:33 -0400 Received: from mout01.posteo.de ([185.67.36.65]:38217) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw1H0-0005mw-Es for 63337@debbugs.gnu.org; Mon, 08 May 2023 09:51:31 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 75AF224019D for <63337@debbugs.gnu.org>; Mon, 8 May 2023 15:51:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683553884; bh=eh4/soxFfaINr4+Cwcw6JhdnndOi6x2Im6WpO5DGXOg=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=R4wIt4MoJ3be3MvOy2TdL6LKPGvYTFXHBw921oinTyIrbr4UEz8N6ct+HwZnPz5EJ 3M7c08nUpqA/mIdzxAeNWbEkYxR1/Kly2vcCFlcWEe3bpPrpSOUm8zbUvswpIJkPrZ Bzzf58NZaTQWN9N0WqFCSUGWF1l1R5T6v2fGsyXCFQgNGPU9vRcZziVZotRzmJ8umu Lh/XVxqRnHM7Q9qvCaIy8FyoBBmOnQ2bK2Hk05PlwfM8/RFntESJ1yW3y0JENOyCnC jBih8i7KCKKxYflEqw9xS73c09FuXmPn6sZCymrw4iQvT7XDvIa2cjaLYxdpxi8L8x 9FPUO4Zu7xmpw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QFN4C6VZwz9rxB; Mon, 8 May 2023 15:51:23 +0200 (CEST) From: Philip Kaludercic To: Joseph Turner Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements In-Reply-To: <87fs877tgz.fsf@breatheoutbreathe.in> (Joseph Turner's message of "Sun, 07 May 2023 13:29:53 -0700") References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> 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 Date: Mon, 08 May 2023 13:51:23 +0000 Message-ID: <875y936iec.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Joseph Turner writes: > Philip Kaludercic writes: > >> Eli Zaretskii writes: >> >>>> Cc: 63337@debbugs.gnu.org >>>> Date: Sun, 07 May 2023 11:40:46 -0700 >>>> From: Joseph Turner via "Bug reports for GNU Emacs, >>>> the Swiss army knife of text editors" >>>> >>>> > 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. >> >> I don't know that either, and I can imagine that certain versions of >> makeinfo might be patched or this could change in the future. >> >>> It doesn't, according to the Texinfo manual. Only the current >>> directory is searched. >>> >>>> In the attached diff, I have changed -I to -P. >>> >>> I think it's a mistake: the current directory should searched first. >>> So -I is better. >> >> What do we mean by the current directory? When building the manual from >> an org-file, we switch to a temporary directory (where the .org -> .texi >> conversion is stored), so the "actual" directory is not the same as the >> default-directory. > > AFAICT, makeinfo searches the default-directory. See attached patch, > where we let-bind default-directory to the docs-directory. In this case, > neither -I nor -P is necessary. > > It's a bit strange to let-bind default-directory twice in the same > function, but we can't bind it at the top of the function, the > insert-file-contents expects default-directory to be package-desc-dir. It might be, but I'll have to look into that in more detail, that the first default-directory binding is not necessary if we pass (package-desc-dir pkg-desc) as the second argument to `expand-file-name' when binding `output'. Then this would all be simplified, and we could avoid the confusion you mention. > Joseph > > From 7ddfd7ab08820eef159b21047194aaaf4c8841f7 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 | 23 +++++++++++++---------- > 1 file changed, 13 insertions(+), 10 deletions(-) > > diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el > index 476c38916a8..c25a96ed942 100644 > --- a/lisp/emacs-lisp/package-vc.el > +++ b/lisp/emacs-lisp/package-vc.el > @@ -377,6 +377,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) > @@ -389,16 +390,18 @@ otherwise it's assumed to be an Info file." > (setq clean-up t))) > (with-current-buffer (get-buffer-create " *package-vc doc*") > (erase-buffer) > - (cond > - ((/= 0 (call-process "makeinfo" nil t nil > - "--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 > - output (expand-file-name "dir"))) > - (message "Failed to install manual %s, see buffer %S" > - output (buffer-name))) > - ((kill-buffer)))) > + (let ((default-directory docs-directory)) > + ;; `let'-bind `default-directory' so that makeinfo resolves > + ;; relative @include statements in the docs directory > + (cond > + ((/= 0 (call-process "makeinfo" nil t nil "--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 > + output (expand-file-name "dir"))) > + (message "Failed to install manual %s, see buffer %S" > + output (buffer-name))) > + ((kill-buffer))))) > (when clean-up > (delete-file file)))) From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 15:26:17 2023 Received: (at 63337) by debbugs.gnu.org; 8 May 2023 19:26:17 +0000 Received: from localhost ([127.0.0.1]:41674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw6Uz-0004OS-7P for submit@debbugs.gnu.org; Mon, 08 May 2023 15:26:17 -0400 Received: from out-47.mta1.migadu.com ([95.215.58.47]:14366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pw6Uw-0004OI-Ud for 63337@debbugs.gnu.org; Mon, 08 May 2023 15:26:16 -0400 References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1683573973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b3WY7x0iBMm4ejhHXsEcjpiGtFrFtfTUqC5qVqeK82k=; b=G/smrbF/i6TTL/NuaQwSrUZPzD4teamGcMVaAn4d28NGb24blBkIxeKlzNGKTKkRrYa4jI /WcqbFjaAemuqrCguwbPyRvyvSlgE4Z4nZZvysVOUe2jMIlUbNpOZpjACZFg9/JMbqKuog 4vnt4nLDWDXgiV83B9J8uuMUWIbI21k= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Joseph Turner To: Philip Kaludercic Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Mon, 08 May 2023 12:05:51 -0700 In-reply-to: <875y936iec.fsf@posteo.net> Message-ID: <87y1lyhbfy.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Philip Kaludercic writes: > It might be, but I'll have to look into that in more detail, that the > first default-directory binding is not necessary if we pass > (package-desc-dir pkg-desc) as the second argument to `expand-file-name' > when binding `output'. Then this would all be simplified, and we could > avoid the confusion you mention. While this would mean binding default-directory only once, it still requires two `let'-bindings. The solution in the attached patch requires only one let-binding while changing the behavior of package-vc--build-documentation slightly. Now the output .info file is put inside the same directory as FILE, instead of inside the directory returned by (package-desc-dir pkg-desc). Note about the following two lines: + (file-path (expand-file-name file (package-desc-dir pkg-desc))) + (default-directory (expand-file-name (file-name-directory file-path))) (package-desc-dir pkg-desc) may return a relative path with or without a directory, e.g. "doc/manual.org" or "manual.org". In the latter case, (file-name-directory "manual.org") would return `nil' and (expand-file-name nil) would signal an error. Therefore, in the `file-path' `let'-binding, we first expand the return value of (package-desc-dir pkg-desc) to ensure that it contains a directory. Best, Joseph --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-package-vc-build-documentation-Relative-include-.patch >From 2cf2d522818c75ff5626324251bb74cdc3c36dc7 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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 476c38916a8..65767cf043a 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -376,14 +376,17 @@ Package specs are loaded from trusted package archives." 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)) + (file-path (expand-file-name file (package-desc-dir pkg-desc))) + ;; `let'-bind `default-directory' to the directory containing the .org or .info FILE + ;; so that makeinfo can resolve relative @include statements in the docs directory. + (default-directory (expand-file-name (file-name-directory file-path))) (output (expand-file-name (format "%s.info" pkg-name))) clean-up) (when (string-match-p "\\.org\\'" file) (require 'ox) (require 'ox-texinfo) (with-temp-buffer - (insert-file-contents file) + (insert-file-contents file-path) (setq file (make-temp-file "ox-texinfo-")) (org-export-to-file 'texinfo file) (setq clean-up t))) -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 21:36:44 2023 Received: (at submit) by debbugs.gnu.org; 9 May 2023 01:36:44 +0000 Received: from localhost ([127.0.0.1]:42011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwCHT-00079Z-Rb for submit@debbugs.gnu.org; Mon, 08 May 2023 21:36:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:39198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwCHS-00079S-7h for submit@debbugs.gnu.org; Mon, 08 May 2023 21:36:42 -0400 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 1pwCHR-0004Mp-Tv for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 21:36:41 -0400 Received: from netyu.xyz ([152.44.41.246] helo=mail.netyu.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwCHQ-0001Om-98; Mon, 08 May 2023 21:36:41 -0400 Received: from fw.net.yu.netyu.xyz ( [222.248.4.98]) by netyu.xyz (OpenSMTPD) with ESMTPSA id 4db5fed8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 9 May 2023 01:36:36 +0000 (UTC) References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> <87y1lyhbfy.fsf@breatheoutbreathe.in> User-agent: mu4e 1.11.3; emacs 30.0.50 From: Ruijie Yu To: Joseph Turner Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Tue, 09 May 2023 09:34:18 +0800 In-reply-to: <87y1lyhbfy.fsf@breatheoutbreathe.in> Message-ID: MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=152.44.41.246; envelope-from=ruijie@netyu.xyz; helo=mail.netyu.xyz X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: 63337@debbugs.gnu.org, Philip Kaludercic , bug-gnu-emacs@gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > + (file-path (expand-file-name file (package-desc-dir pkg-desc))) > + (default-directory (expand-file-name (file-name-directory file-path))) > > (package-desc-dir pkg-desc) may return a relative path with or without a > directory, e.g. "doc/manual.org" or "manual.org". In the latter case, > (file-name-directory "manual.org") would return `nil' and > (expand-file-name nil) would signal an error. In this case, can't you do this instead: (expand-file-name (or (file-name-directory ...) ".")) ? -- Best, RY From debbugs-submit-bounces@debbugs.gnu.org Mon May 08 22:56:30 2023 Received: (at submit) by debbugs.gnu.org; 9 May 2023 02:56:30 +0000 Received: from localhost ([127.0.0.1]:42083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwDWg-0001PL-0w for submit@debbugs.gnu.org; Mon, 08 May 2023 22:56:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:56306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwDWd-0001P9-IP for submit@debbugs.gnu.org; Mon, 08 May 2023 22:56:28 -0400 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 1pwDWd-0003vD-CO for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 22:56:27 -0400 Received: from out-36.mta1.migadu.com ([2001:41d0:203:375::24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwDWb-0000bD-7y for bug-gnu-emacs@gnu.org; Mon, 08 May 2023 22:56:27 -0400 References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> <87y1lyhbfy.fsf@breatheoutbreathe.in> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1683600976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Hzq+Cgsku3Ul0OtqlUU8aKczpw4pGM4nEeae5lp9xZs=; b=NLXkc3TkwPogmM7EFAltRaiSCb8cgxo4SU8ImkLZB0CRXIwQK+D8eBhvyjnAXFdR0XG8rG d2SD7MP8S6/MelaDntuHCIVqByD5I6yDuJ8JznId1rNKw/zqE4sUaKWbVsQq08JXzGJHNa F+DCizDIOF6Ctpm+e+wSYdfJFIosw6g= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Joseph Turner To: Ruijie Yu Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Mon, 08 May 2023 19:48:30 -0700 In-reply-to: Message-ID: <87wn1ii56a.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:203:375::24; envelope-from=joseph@breatheoutbreathe.in; helo=out-36.mta1.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: 63337@debbugs.gnu.org, Philip Kaludercic , bug-gnu-emacs@gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Ruijie Yu writes: > Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > >> + (file-path (expand-file-name file (package-desc-dir pkg-desc))) >> + (default-directory (expand-file-name (file-name-directory file-path))) >> >> (package-desc-dir pkg-desc) may return a relative path with or without a >> directory, e.g. "doc/manual.org" or "manual.org". In the latter case, >> (file-name-directory "manual.org") would return `nil' and >> (expand-file-name nil) would signal an error. > > In this case, can't you do this instead: > > (expand-file-name (or (file-name-directory ...) ".")) Yes, we could do this, but we make use of FILE-PATH anyway. We can't use FILE after DEFAULT-DIRECTORY has been set the file containing FILE. The choice is between (file-name-directory file-path) and (or (file-name-directory file) ".") I think the intent comes across more clearly in the former. Joseph From debbugs-submit-bounces@debbugs.gnu.org Tue May 09 00:35:50 2023 Received: (at 63337) by debbugs.gnu.org; 9 May 2023 04:35:50 +0000 Received: from localhost ([127.0.0.1]:42159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwF4n-0004Bp-Pa for submit@debbugs.gnu.org; Tue, 09 May 2023 00:35:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwF4l-0004Bb-Lw for 63337@debbugs.gnu.org; Tue, 09 May 2023 00:35:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwF4f-0003dK-13; Tue, 09 May 2023 00:35:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=az8wvFMewX57+ymBjUep6Vhn5QpxShsSiLMs81p+XOk=; b=otXdj51xA4HB nuP2BMDnv30HFQ0RVCZthJbfofzI0ZKH1cdwecdTcjlijEQh6wPCONPL/FNawUPAyVyH3M6YQJ1db dCa91Mw+o2OWEtU/WWUdg7ujxgK9PW5qyXJ/XoL62Fn88wJ3BqKuX5VCFaQxmV+zxwtggQzDhvS1h V+fvUQXHHj4oZPumZNfF1T9jU7peaJv3QsMB+Wj7pOvoRAYcPolm8zJcTJrh0sBiozcGPOwGbKCUM E38MkitQo3JkmnIWg/qv3yZAFSwBdZ/jCeOl1TcyEUyMBvoIAY1Lsw6HEKe96RXs4jPg4/hjxckT4 kxKF5vpBl4LJwdI+3LTrOQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwF4e-00012C-M1; Tue, 09 May 2023 00:35:40 -0400 Date: Tue, 09 May 2023 07:36:42 +0300 Message-Id: <83sfc6azol.fsf@gnu.org> From: Eli Zaretskii To: Joseph Turner In-Reply-To: <87y1lyhbfy.fsf@breatheoutbreathe.in> (message from Joseph Turner on Mon, 08 May 2023 12:05:51 -0700) Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> <87y1lyhbfy.fsf@breatheoutbreathe.in> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, philipk@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Joseph Turner > Cc: Eli Zaretskii , 63337@debbugs.gnu.org > Date: Mon, 08 May 2023 12:05:51 -0700 > > Note about the following two lines: > > + (file-path (expand-file-name file (package-desc-dir pkg-desc))) > + (default-directory (expand-file-name (file-name-directory file-path))) > > (package-desc-dir pkg-desc) may return a relative path with or without a > directory, e.g. "doc/manual.org" or "manual.org". In the latter case, > (file-name-directory "manual.org") would return `nil' and > (expand-file-name nil) would signal an error. > > Therefore, in the `file-path' `let'-binding, we first expand the return > value of (package-desc-dir pkg-desc) to ensure that it contains a directory. Please don't use "path" for anything that is not a PATH-style list of directory: the GNU Coding Standards frown on such usage. We use file-name instead. For the same reasons, please don't give your variables names that include "path" unless they are lists of directories. > --- a/lisp/emacs-lisp/package-vc.el > +++ b/lisp/emacs-lisp/package-vc.el > @@ -376,14 +376,17 @@ Package specs are loaded from trusted package archives." > 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)) > + (file-path (expand-file-name file (package-desc-dir pkg-desc))) > + ;; `let'-bind `default-directory' to the directory containing the .org or .info FILE > + ;; so that makeinfo can resolve relative @include statements in the docs directory. > + (default-directory (expand-file-name (file-name-directory file-path))) There should be no reason to call expand-file-name in the last line, since the argument of file-name-directory is already expanded. Also, please make the comment lines shorter, preferably less than 75 columns. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue May 09 19:50:57 2023 Received: (at 63337) by debbugs.gnu.org; 9 May 2023 23:50:57 +0000 Received: from localhost ([127.0.0.1]:44748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwX6e-00043r-UO for submit@debbugs.gnu.org; Tue, 09 May 2023 19:50:57 -0400 Received: from out-54.mta1.migadu.com ([95.215.58.54]:56253) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwX6a-000432-0u for 63337@debbugs.gnu.org; Tue, 09 May 2023 19:50:55 -0400 References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> <87y1lyhbfy.fsf@breatheoutbreathe.in> <83sfc6azol.fsf@gnu.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1683676250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5yfDnf0d4p5B9f1ClB0ZxU7+nArM+7Ze+bnPnKsF8fE=; b=XzAJbBKESnCmDdZn9g/QbnPlBdsCO0ra+PLYIlGGWVKMkm0S3HeBZ4Hlm7x5/SwRLBKhv9 QhwoznHb5437cPd9zirsbEAP7MGyKJtI/BEAkiYZjMeH+0ePXqdfYhQG3ICotnjC3WmXA2 3UhhtWM95mgOxENdFyJ0K+qsGhPVwJQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Joseph Turner To: Eli Zaretskii Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Tue, 09 May 2023 16:49:24 -0700 In-reply-to: <83sfc6azol.fsf@gnu.org> Message-ID: <87bkitgj3c.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, philipk@posteo.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Joseph Turner >> Cc: Eli Zaretskii , 63337@debbugs.gnu.org >> Date: Mon, 08 May 2023 12:05:51 -0700 >> >> Note about the following two lines: >> >> + (file-path (expand-file-name file (package-desc-dir pkg-desc))) >> + (default-directory (expand-file-name (file-name-directory file-path))) >> >> (package-desc-dir pkg-desc) may return a relative path with or without a >> directory, e.g. "doc/manual.org" or "manual.org". In the latter case, >> (file-name-directory "manual.org") would return `nil' and >> (expand-file-name nil) would signal an error. >> >> Therefore, in the `file-path' `let'-binding, we first expand the return >> value of (package-desc-dir pkg-desc) to ensure that it contains a directory. > > Please don't use "path" for anything that is not a PATH-style list of > directory: the GNU Coding Standards frown on such usage. We use > file-name instead. For the same reasons, please don't give your > variables names that include "path" unless they are lists of > directories. Good to know, thank you! I changed `file-path' to `file-name'. >> --- a/lisp/emacs-lisp/package-vc.el >> +++ b/lisp/emacs-lisp/package-vc.el >> @@ -376,14 +376,17 @@ Package specs are loaded from trusted package archives." >> 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)) >> + (file-path (expand-file-name file (package-desc-dir pkg-desc))) >> + ;; `let'-bind `default-directory' to the directory containing the .org or .info FILE >> + ;; so that makeinfo can resolve relative @include statements in the docs directory. >> + (default-directory (expand-file-name (file-name-directory file-path))) > > There should be no reason to call expand-file-name in the last line, > since the argument of file-name-directory is already expanded. Good catch! Fixed. > Also, please make the comment lines shorter, preferably less than 75 > columns. Done. Thank you!! Joseph --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-package-vc-build-documentation-Relative-include-.patch >From c670f47ef55b41265c064a2d4ab1e56c46e57272 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 95e12fc829a..efcfd635e98 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -377,14 +377,18 @@ Package specs are loaded from trusted package archives." 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)) + (file-name (expand-file-name file (package-desc-dir pkg-desc))) + ;; `let'-bind `default-directory' to the directory containing + ;; the .org or .info FILE so that makeinfo can resolve + ;; relative @include statements in the docs directory. + (default-directory (file-name-directory file-name)) (output (expand-file-name (format "%s.info" pkg-name))) clean-up) (when (string-match-p "\\.org\\'" file) (require 'ox) (require 'ox-texinfo) (with-temp-buffer - (insert-file-contents file) + (insert-file-contents file-name) (setq file (make-temp-file "ox-texinfo-")) (org-export-to-file 'texinfo file) (setq clean-up t))) -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 10 02:52:04 2023 Received: (at 63337) by debbugs.gnu.org; 10 May 2023 06:52:04 +0000 Received: from localhost ([127.0.0.1]:45058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwdgC-0002hJ-CV for submit@debbugs.gnu.org; Wed, 10 May 2023 02:52:04 -0400 Received: from mout02.posteo.de ([185.67.36.66]:48943) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwdg8-0002gl-JF for 63337@debbugs.gnu.org; Wed, 10 May 2023 02:52:02 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 810F3240937 for <63337@debbugs.gnu.org>; Wed, 10 May 2023 08:51:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683701514; bh=9pvLpr5W54+07RyeoyKucin0QWIq1+sXQsP/MQtnerg=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=nGKL87Zl43zUfnP9L4vofYfguA3wVpw2AAjACZxL4lRZtf1mm3zqFmfFU6ObHftqW MMfLCBx9R4odY7uS32Vqu4ASuM9neG0B/PyiKao3cAQSGMw+houki+OTrJUbLtqzBj fJjxJj44qipyK/FB+0eKEyoK7nRNS8EAhnVS3XLlAkVkPajmRAdCqcx0kqxR6eDStA VrD1hKDqmCKEz54hTkWY+0SxHsrKmId7twKKSCz3IS/tOyyc2X2xydaeX6ng116dov GCV8BDitlPiOBE/6ZnvlvnxcDIzWYY64rJw8JwIM13Qu8ux3i/HdrPmpRhOTAyHR1G imETrtIM0iuIQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QGQgG072Jz9rxG; Wed, 10 May 2023 08:51:53 +0200 (CEST) From: Philip Kaludercic To: Joseph Turner Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements In-Reply-To: <87bkitgj3c.fsf@breatheoutbreathe.in> (Joseph Turner's message of "Tue, 09 May 2023 16:49:24 -0700") References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> <87y1lyhbfy.fsf@breatheoutbreathe.in> <83sfc6azol.fsf@gnu.org> <87bkitgj3c.fsf@breatheoutbreathe.in> 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 Date: Wed, 10 May 2023 06:51:53 +0000 Message-ID: <87lehwfzli.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Joseph Turner writes: > Eli Zaretskii writes: > >>> From: Joseph Turner >>> Cc: Eli Zaretskii , 63337@debbugs.gnu.org >>> Date: Mon, 08 May 2023 12:05:51 -0700 >>> >>> Note about the following two lines: >>> >>> + (file-path (expand-file-name file (package-desc-dir pkg-desc))) >>> + (default-directory (expand-file-name (file-name-directory file-path))) >>> >>> (package-desc-dir pkg-desc) may return a relative path with or without a >>> directory, e.g. "doc/manual.org" or "manual.org". In the latter case, >>> (file-name-directory "manual.org") would return `nil' and >>> (expand-file-name nil) would signal an error. >>> >>> Therefore, in the `file-path' `let'-binding, we first expand the return >>> value of (package-desc-dir pkg-desc) to ensure that it contains a directory. >> >> Please don't use "path" for anything that is not a PATH-style list of >> directory: the GNU Coding Standards frown on such usage. We use >> file-name instead. For the same reasons, please don't give your >> variables names that include "path" unless they are lists of >> directories. > > Good to know, thank you! I changed `file-path' to `file-name'. > >>> --- a/lisp/emacs-lisp/package-vc.el >>> +++ b/lisp/emacs-lisp/package-vc.el >>> @@ -376,14 +376,17 @@ Package specs are loaded from trusted package archives." >>> 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)) >>> + (file-path (expand-file-name file (package-desc-dir pkg-desc))) >>> + ;; `let'-bind `default-directory' to the directory containing the .org or .info FILE >>> + ;; so that makeinfo can resolve relative @include statements in the docs directory. >>> + (default-directory (expand-file-name (file-name-directory file-path))) >> >> There should be no reason to call expand-file-name in the last line, >> since the argument of file-name-directory is already expanded. > > Good catch! Fixed. > >> Also, please make the comment lines shorter, preferably less than 75 >> columns. > > Done. > > Thank you!! > > Joseph Ok, do you have a few example repositories that we can use to test edge-cases? From debbugs-submit-bounces@debbugs.gnu.org Wed May 10 22:06:02 2023 Received: (at 63337) by debbugs.gnu.org; 11 May 2023 02:06:02 +0000 Received: from localhost ([127.0.0.1]:49336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwvgv-0002si-SM for submit@debbugs.gnu.org; Wed, 10 May 2023 22:06:02 -0400 Received: from out-19.mta0.migadu.com ([91.218.175.19]:48186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pwvgs-0002sO-7Q for 63337@debbugs.gnu.org; Wed, 10 May 2023 22:06:00 -0400 References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> <87y1lyhbfy.fsf@breatheoutbreathe.in> <83sfc6azol.fsf@gnu.org> <87bkitgj3c.fsf@breatheoutbreathe.in> <87lehwfzli.fsf@posteo.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1683770756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QWSrZY3MwrMdoSvSMolVswgPahircmdjtKymtfJaurg=; b=KL3omGSSWs9lR7s3uaJYV+tmirvLhc13gU8cdHntj8b01rncV6mD5eKSxE3CDJ5wHHFxJI igJ18tYpdznS3Iy1IuSsNQiCcKIzhHPQf8inTvdvYYgcAooHl1h1UJjqTwhg5Y7RPRJJqk E35Razgz8QQ1Obw56B7RA/QfCXoB/fE= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Joseph Turner To: Philip Kaludercic Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Wed, 10 May 2023 19:04:02 -0700 In-reply-to: <87lehwfzli.fsf@posteo.net> Message-ID: <87a5ybsjum.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip Kaludercic writes: > Ok, do you have a few example repositories that we can use to test edge-cases? I first noticed this issue when attempting to build the docs for org-transclusion. Besides that, we could select a few package specs containing :make at random from https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/elpa-packages ? Joseph From debbugs-submit-bounces@debbugs.gnu.org Fri May 12 02:51:28 2023 Received: (at 63337) by debbugs.gnu.org; 12 May 2023 06:51:28 +0000 Received: from localhost ([127.0.0.1]:53871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxMci-0007lJ-6W for submit@debbugs.gnu.org; Fri, 12 May 2023 02:51:28 -0400 Received: from mout02.posteo.de ([185.67.36.66]:41399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxMcg-0007l2-FQ for 63337@debbugs.gnu.org; Fri, 12 May 2023 02:51:27 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id BF3B7240233 for <63337@debbugs.gnu.org>; Fri, 12 May 2023 08:51:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683874280; bh=V3A5IrsNpO7Rui2+HMUG08rC7mtsiLwGosRAUMKDvjE=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=NWQK/Q4nGRCfIhsSc+jjOZms59FoaoOduNjhm1NV4DTqDyMo6jF/hnsDzGp8RWtdX qZXrf4VZ1FORkSjPmbtp5HMbz79oT5LP7SJACZytC+rWpnBuUDGd4x8Qc0RSUkmdCT DsDWI9ZCZ3hVDJwqlVtRCE7Eq8f1m9lopJrzvAhS7FhXHIzhY4KhJ2HU/q+0ydc6t+ uJY3fTpVo+YLaoIt66ua4Uc2SPZS0MyzNxWE0KtqHA2diUvMCcjAVq2kQ18C+HVkEd +/EUHvF/UrjhmtTV3D48IpJzVVt/yo7r6XeSybPtE/gxuCsvA8m77OureJ8cSBHACT cc1e1iT9Rp/mw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QHfYh0tjsz6txJ; Fri, 12 May 2023 08:51:20 +0200 (CEST) From: Philip Kaludercic To: Joseph Turner Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements In-Reply-To: <87a5ybsjum.fsf@breatheoutbreathe.in> (Joseph Turner's message of "Wed, 10 May 2023 19:04:02 -0700") References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> <87y1lyhbfy.fsf@breatheoutbreathe.in> <83sfc6azol.fsf@gnu.org> <87bkitgj3c.fsf@breatheoutbreathe.in> <87lehwfzli.fsf@posteo.net> <87a5ybsjum.fsf@breatheoutbreathe.in> 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 Date: Fri, 12 May 2023 06:51:19 +0000 Message-ID: <875y8yxct4.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Joseph Turner writes: > Philip Kaludercic writes: > >> Ok, do you have a few example repositories that we can use to test edge-cases? > > I first noticed this issue when attempting to build the docs for > org-transclusion. Besides that, we could select a few package specs > containing :make at random from > https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/elpa-packages ? One issue I still notice in this case is that if the file doesn't exist, the issue is raised by `insert-file-contents' which aborts the entire installation. Does checking the existence of the file, and continuing on if this is not the case make sense: --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index e9794eac783..1c1492d87b2 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -353,28 +353,30 @@ package-vc--build-documentation (default-directory (file-name-directory file-name)) (output (expand-file-name (format "%s.info" pkg-name))) clean-up) - (when (string-match-p "\\.org\\'" file) - (require 'ox) - (require 'ox-texinfo) - (with-temp-buffer - (insert-file-contents file-name) - (setq file (make-temp-file "ox-texinfo-")) - (org-export-to-file 'texinfo file) - (setq clean-up t))) - (with-current-buffer (get-buffer-create " *package-vc doc*") - (erase-buffer) - (cond - ((/= 0 (call-process "makeinfo" nil t nil - "--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 - output (expand-file-name "dir"))) - (message "Failed to install manual %s, see buffer %S" - output (buffer-name))) - ((kill-buffer)))) - (when clean-up - (delete-file file)))) + (if (not (file-exists-p file-name)) + (message "Documentation file %S for %s not found" file pkg-name) + (when (string-match-p "\\.org\\'" file) + (require 'ox) + (require 'ox-texinfo) + (with-temp-buffer + (insert-file-contents file-name) + (setq file (make-temp-file "ox-texinfo-")) + (org-export-to-file 'texinfo file) + (setq clean-up t))) + (with-current-buffer (get-buffer-create " *package-vc doc*") + (erase-buffer) + (cond + ((/= 0 (call-process "makeinfo" nil t nil + "--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 + output (expand-file-name "dir"))) + (message "Failed to install manual %s, see buffer %S" + output (buffer-name))) + ((kill-buffer)))) + (when clean-up + (delete-file file))))) (defun package-vc-install-dependencies (requirements) "Install missing dependencies, and return missing ones. --=-=-= Content-Type: text/plain > Joseph --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 12 02:56:44 2023 Received: (at 63337) by debbugs.gnu.org; 12 May 2023 06:56:44 +0000 Received: from localhost ([127.0.0.1]:53880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxMho-0007sv-CC for submit@debbugs.gnu.org; Fri, 12 May 2023 02:56:44 -0400 Received: from mout02.posteo.de ([185.67.36.66]:52655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxMhm-0007sd-PT for 63337@debbugs.gnu.org; Fri, 12 May 2023 02:56:43 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 3134B2402AD for <63337@debbugs.gnu.org>; Fri, 12 May 2023 08:56:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683874597; bh=450ht7fyzT6mZjftd9lBem8spJSrE+9w8wAASaiqOCU=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=NQsMbRYHEnrfvhOaUhxvihE7b+2oQPuOS3PBwZxhpFSyj+SgiOVLx9obkrVOZYH8r N5xoZPyYPlWRFZ7xdxvuE9uQESRXmWmR7au6aKRpV4KFq0HB2BCdvOxnfr890xbNEA yBFVw/KRBxq93ZzTcAlTLCX5SZ9aoaQhBdJArW0SLUw7WjTQfKW/tfNnOIl4bzwaMf XhZpjlM0lmBIGHZHhTJ3UHE4fy01XdzZmY6r3RMPNH2ArIOWBIdxgyJCEwPuVBn2Yx 4SURGckJ28/BJzYOLTnkv4ZaX9ysxIqkOHvVVXjR03o087Lt43r+UP4SyXNOCtfs1b Gxrenyw+1jhOA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QHfgm5JG4z6tsj; Fri, 12 May 2023 08:56:36 +0200 (CEST) From: Philip Kaludercic To: Joseph Turner Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements In-Reply-To: <87a5ybsjum.fsf@breatheoutbreathe.in> (Joseph Turner's message of "Wed, 10 May 2023 19:04:02 -0700") References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> <87y1lyhbfy.fsf@breatheoutbreathe.in> <83sfc6azol.fsf@gnu.org> <87bkitgj3c.fsf@breatheoutbreathe.in> <87lehwfzli.fsf@posteo.net> <87a5ybsjum.fsf@breatheoutbreathe.in> 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 Date: Fri, 12 May 2023 06:56:36 +0000 Message-ID: <87y1luvxzv.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Joseph Turner writes: > Philip Kaludercic writes: > >> Ok, do you have a few example repositories that we can use to test edge-cases? > > I first noticed this issue when attempting to build the docs for > org-transclusion. Besides that, we could select a few package specs > containing :make at random from > https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/elpa-packages ? Oh, and a big problem is that the "dir" file is written into the wrong directory. It has to be located in the root directory of the package, not in docs/ (in the case of org-transclusion). Sadly adjusting the second argument doesn't fix the issue: --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index e9794eac783..9876705e57f 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -369,7 +369,8 @@ package-vc--build-documentation (message "Failed to build manual %s, see buffer %S" file (buffer-name))) ((/= 0 (call-process "install-info" nil t nil - output (expand-file-name "dir"))) + output + (expand-file-name "dir" (package-desc-dir pkg-desc)))) (message "Failed to install manual %s, see buffer %S" output (buffer-name))) ((kill-buffer)))) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable While the entry does appear in (dir) Top, the file cannot be opened: Info-find-file: Info file =E2=80=98org-transclusion=E2=80=99 does not exi= st; consider installing it > Joseph --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 12 03:13:38 2023 Received: (at 63337) by debbugs.gnu.org; 12 May 2023 07:13:38 +0000 Received: from localhost ([127.0.0.1]:53899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxMyA-0008IW-9s for submit@debbugs.gnu.org; Fri, 12 May 2023 03:13:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxMy9-0008II-5o for 63337@debbugs.gnu.org; Fri, 12 May 2023 03:13:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pxMy2-0004Aj-MG; Fri, 12 May 2023 03:13:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=HFyRpY8x3Q4EAhsULT6TEjApxBzOXJFjgNAHwd6JI3E=; b=VUfTFWzPlK+W jDQt7k9EIhCvQGRf+F+hyGLWKMcJjrFgiKdH1ERxH4I2sH6rzVh/fTDL2NzUaW8/o8PQ4wyqA8b/2 7wbMi97ER/P4wV4C7FSrhtN+B/V8xCYGyp6vFtJ3YkUZXu+1H+BYPH/xdtDSz/WI1nFkEWFPDQLcA Vp2ICuINAlAz+y01mYprTzK30DhMuOYZlKTxub2qquJ4cNV6YgAgvnzkeW/uB3Jcg1lpatZMiqAFt 0vlqlmoWEVnBMh12cVywvlp6YmKVojpX6IeTYMjv590KbC09tbRCcuchdHCcPCrsNUxhXr71P8tQK dWX0+qNYz5dmDFCWAYG7nw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pxMxu-0003w9-Pi; Fri, 12 May 2023 03:13:29 -0400 Date: Fri, 12 May 2023 10:14:31 +0300 Message-Id: <838rdu3tt4.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <875y8yxct4.fsf@posteo.net> (message from Philip Kaludercic on Fri, 12 May 2023 06:51:19 +0000) Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> <87y1lyhbfy.fsf@breatheoutbreathe.in> <83sfc6azol.fsf@gnu.org> <87bkitgj3c.fsf@breatheoutbreathe.in> <87lehwfzli.fsf@posteo.net> <87a5ybsjum.fsf@breatheoutbreathe.in> <875y8yxct4.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, joseph@breatheoutbreathe.in X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Cc: Eli Zaretskii , 63337@debbugs.gnu.org > Date: Fri, 12 May 2023 06:51:19 +0000 > > One issue I still notice in this case is that if the file doesn't exist, > the issue is raised by `insert-file-contents' which aborts the entire > installation. Does checking the existence of the file, and continuing > on if this is not the case make sense: If the file's (non)existence is the problem, then checking that up front is an okay solution, IMO. Are there any downsides to doing that? From debbugs-submit-bounces@debbugs.gnu.org Fri May 12 03:35:26 2023 Received: (at 63337) by debbugs.gnu.org; 12 May 2023 07:35:26 +0000 Received: from localhost ([127.0.0.1]:53942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxNJF-0000SH-VG for submit@debbugs.gnu.org; Fri, 12 May 2023 03:35:26 -0400 Received: from mout02.posteo.de ([185.67.36.66]:37727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxNJE-0000S2-2Y for 63337@debbugs.gnu.org; Fri, 12 May 2023 03:35:24 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1D0CC24028A for <63337@debbugs.gnu.org>; Fri, 12 May 2023 09:35:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683876918; bh=/NHfws6su9NsPYUDFP+Xc2choh3Qcsu9iIIRTU+jfOI=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=frGv4teP2aslWplsmIV+UpJd5ENLLb9AXEmzoG9+zHSYm+CoQMLbYtmiY9n3J101y poKPz8zbuwpEqJDj9KG1dWgHotHxceEiTkIvBX9fUQycyaSWhS4shogUtAdFifEnAg FCxuq5mrgOWChPHm5pL0J9LtPPmg/m0YP+GIrNcd6WxvZIBLVTFs1W8SEOun9GcedD jvUn9fupTBiRxjfqofrgWzWdOWO2LSoCQrAHqL1P9puhKf9QC8nAVx3CvJKD9wjJE/ CukCBzZ/EAj8hcF/sFGusth05ND6ZJVirHUmRezgsi5cHo3KJy6nisqd6IXNNosHsz NJiVzOZULf2YA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QHgXP2LdDz9rxD; Fri, 12 May 2023 09:35:17 +0200 (CEST) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements In-Reply-To: <838rdu3tt4.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 12 May 2023 10:14:31 +0300") References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> <87y1lyhbfy.fsf@breatheoutbreathe.in> <83sfc6azol.fsf@gnu.org> <87bkitgj3c.fsf@breatheoutbreathe.in> <87lehwfzli.fsf@posteo.net> <87a5ybsjum.fsf@breatheoutbreathe.in> <875y8yxct4.fsf@posteo.net> <838rdu3tt4.fsf@gnu.org> 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 Date: Fri, 12 May 2023 07:35:16 +0000 Message-ID: <87ttwivw7f.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, joseph@breatheoutbreathe.in X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: Eli Zaretskii , 63337@debbugs.gnu.org >> Date: Fri, 12 May 2023 06:51:19 +0000 >> >> One issue I still notice in this case is that if the file doesn't exist, >> the issue is raised by `insert-file-contents' which aborts the entire >> installation. Does checking the existence of the file, and continuing >> on if this is not the case make sense: > > If the file's (non)existence is the problem, then checking that up > front is an okay solution, IMO. Are there any downsides to doing that? One might not notice that there was an issue with the package specification, since a number of messages are usually generated when installing a package. But I agree that this sounds better than not being able to install the package at all (as is currently the case with org-transclusion). From debbugs-submit-bounces@debbugs.gnu.org Sat May 13 01:53:49 2023 Received: (at 63337) by debbugs.gnu.org; 13 May 2023 05:53:49 +0000 Received: from localhost ([127.0.0.1]:35424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxiCT-0000DX-4c for submit@debbugs.gnu.org; Sat, 13 May 2023 01:53:49 -0400 Received: from out-61.mta0.migadu.com ([91.218.175.61]:39820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxiCQ-0000DO-Ig for 63337@debbugs.gnu.org; Sat, 13 May 2023 01:53:47 -0400 References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> <87y1lyhbfy.fsf@breatheoutbreathe.in> <83sfc6azol.fsf@gnu.org> <87bkitgj3c.fsf@breatheoutbreathe.in> <87lehwfzli.fsf@posteo.net> <87a5ybsjum.fsf@breatheoutbreathe.in> <87y1luvxzv.fsf@posteo.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1683957225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IcjmeB0Vy1B58XPZBRDvnbLIDQ3QehBzvZcox8rO630=; b=hyDjBzPE2YzaP+GmhLVwh2uh209ctNKipTwvrJ9/VvtxGg8mHdLadETfEoWOucrnLtNaXU fJraeiRSTNYgVgiA0xhM8L3QjTtvoNLKreMTksoDv8XAkkoI0hah5Nvkd0m04QT07bPiLf NELPSWWKrtG97ccqzU+ifh++NBInvdc= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Joseph Turner To: Philip Kaludercic Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Fri, 12 May 2023 22:47:11 -0700 In-reply-to: <87y1luvxzv.fsf@posteo.net> Message-ID: <87lehs93q2.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip Kaludercic writes: > Oh, and a big problem is that the "dir" file is written into the wrong > directory. It has to be located in the root directory of the package, > not in docs/ (in the case of org-transclusion). Sadly adjusting the > second argument doesn't fix the issue: > > diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el > index e9794eac783..9876705e57f 100644 > --- a/lisp/emacs-lisp/package-vc.el > +++ b/lisp/emacs-lisp/package-vc.el > @@ -369,7 +369,8 @@ package-vc--build-documentation > (message "Failed to build manual %s, see buffer %S" > file (buffer-name))) > ((/=3D 0 (call-process "install-info" nil t nil > - output (expand-file-name "dir"))) > + output > + (expand-file-name "dir" (package-desc-dir pk= g-desc)))) > (message "Failed to install manual %s, see buffer %S" > output (buffer-name))) > ((kill-buffer)))) > > > While the entry does appear in (dir) Top, the file cannot be opened: > > Info-find-file: Info file =E2=80=98org-transclusion=E2=80=99 does not e= xist; consider installing it IIUC, you're saying that default-directory needs to be (package-desc-dir pk= g-desc) when install-info runs, right? Perhaps we should revisit the first patch I sent: - leave default-directory as-is - pass "-I docs-directory" to makeinfo If makeinfo starts including more directory besides the working directory in the future, I think it will still make sense to append the docs-directory to the search path. From debbugs-submit-bounces@debbugs.gnu.org Sat May 13 01:55:12 2023 Received: (at 63337) by debbugs.gnu.org; 13 May 2023 05:55:12 +0000 Received: from localhost ([127.0.0.1]:35437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxiDo-0000J0-D6 for submit@debbugs.gnu.org; Sat, 13 May 2023 01:55:12 -0400 Received: from out-51.mta1.migadu.com ([95.215.58.51]:62648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxiDm-0000Ie-QK for 63337@debbugs.gnu.org; Sat, 13 May 2023 01:55:11 -0400 References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <83zg6gc5yp.fsf@gnu.org> <87sfc8gd9s.fsf@posteo.net> <87fs877tgz.fsf@breatheoutbreathe.in> <875y936iec.fsf@posteo.net> <87y1lyhbfy.fsf@breatheoutbreathe.in> <83sfc6azol.fsf@gnu.org> <87bkitgj3c.fsf@breatheoutbreathe.in> <87lehwfzli.fsf@posteo.net> <87a5ybsjum.fsf@breatheoutbreathe.in> <875y8yxct4.fsf@posteo.net> <838rdu3tt4.fsf@gnu.org> <87ttwivw7f.fsf@posteo.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1683957309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wAea7/a71pTGPqoiZndRNVhUH38xWh5Q91SQZYEXI4g=; b=aYXgolNTC2n4dlQzPXKuljcKPBJzyoH6DmaY/zvGDAMn69zOGOuXujss97vOgCBkcbnBnL p0WrPPDbSTODIj255uRVHAWvprt6Aluij7UTmOAuIFDS1Dt0vhQr+NHDlUqJ8gRo1yx1qq hy3oYJXhyhXBfjilokbPktNnu5Sk8tw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Joseph Turner To: Philip Kaludercic Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Fri, 12 May 2023 22:54:00 -0700 In-reply-to: <87ttwivw7f.fsf@posteo.net> Message-ID: <87h6sg93nq.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip Kaludercic writes: > Eli Zaretskii writes: > >>> From: Philip Kaludercic >>> Cc: Eli Zaretskii , 63337@debbugs.gnu.org >>> Date: Fri, 12 May 2023 06:51:19 +0000 >>> >>> One issue I still notice in this case is that if the file doesn't exist, >>> the issue is raised by `insert-file-contents' which aborts the entire >>> installation. Does checking the existence of the file, and continuing >>> on if this is not the case make sense: >> >> If the file's (non)existence is the problem, then checking that up >> front is an okay solution, IMO. Are there any downsides to doing that? > > One might not notice that there was an issue with the package > specification, since a number of messages are usually generated when > installing a package. But I agree that this sounds better than not > being able to install the package at all (as is currently the case with > org-transclusion). This change makes sense to me also. Would it be appropriate to use warn instead of message? I'm not sure the convention here. This change belongs in a separate commit, right? From debbugs-submit-bounces@debbugs.gnu.org Sat May 13 04:41:30 2023 Received: (at 63337) by debbugs.gnu.org; 13 May 2023 08:41:30 +0000 Received: from localhost ([127.0.0.1]:35799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxkok-0004uT-3n for submit@debbugs.gnu.org; Sat, 13 May 2023 04:41:30 -0400 Received: from mout01.posteo.de ([185.67.36.65]:57023) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxkoh-0004uD-Lc for 63337@debbugs.gnu.org; Sat, 13 May 2023 04:41:29 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B610A24003B for <63337@debbugs.gnu.org>; Sat, 13 May 2023 10:41:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683967281; bh=e60NzWDz/WnWCxXSgys4S4+JnDfC10rnZZDwA5V8M0g=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=FqzzJ0x8T2PXEo8JQEbKxpjr2LvQBdG9NGl8MUmG21sVfuItd1KVcjKf9e9SGK3GX pLBUKa0lsLSKrW1w+lYPmiupb8x7P47GXqfJ1v6T8w7MO/sdU+7A19UA7kie1/4PNJ 3kffl8HVD77nVQE7Pvwc4iUWnYKeULOGc405Gh7KkZNLR/Jjh9zq01U4Y96dd/XGeV SDjeURGqVRQwMj42LEA957fuNAQOICi/hh4voutCp32XnLtnRcIPZX/ZMJiOBM/d6Z 0hOLl1mYk9wx5skCUyoCHWUae5y6rsE8XOYs6LX7nGx0X/Ts5Hb1XgPWArnuav2J/N ZnAsjYSqiaP8Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QJJy91LLjz6tn4; Sat, 13 May 2023 10:41:21 +0200 (CEST) From: Philip Kaludercic To: Joseph Turner Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements In-Reply-To: <87pm7c7zfs.fsf@breatheoutbreathe.in> (Joseph Turner's message of "Sun, 07 May 2023 11:40:46 -0700") References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> 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 Date: Sat, 13 May 2023 08:41:19 +0000 Message-ID: <875y8waaj4.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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. >> >> Good catch, this should be applied to emacs-29. >> >>> Best, >>> >>> Joseph >>> >>> 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 >> >> 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. >>> + "--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 From debbugs-submit-bounces@debbugs.gnu.org Sat May 13 12:39:59 2023 Received: (at 63337) by debbugs.gnu.org; 13 May 2023 16:39:59 +0000 Received: from localhost ([127.0.0.1]:39440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxsHn-0001Nx-4F for submit@debbugs.gnu.org; Sat, 13 May 2023 12:39:59 -0400 Received: from out-4.mta0.migadu.com ([91.218.175.4]:12812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxsHk-0001Nn-SE for 63337@debbugs.gnu.org; Sat, 13 May 2023 12:39:58 -0400 References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <875y8waaj4.fsf@posteo.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1683995995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zeFMy1YT9PT41XrTYxxKvb7LancTqutCYN5WTGSh4XQ=; b=gkb8UWAWzE/klb1zlwC5gxt4U9KQM9s3ZHWUEDXhwpzDsyDr+YbMEPMWQZNN4qY1DfH8e0 xEBJvxGgt4r0ThmT/hs7O7LS0vwIlO0GJqvuPPG9Mca3SjA6ddRn4Oc/d2Ek9xV8Wkqoc7 aj69VPOTUTQezaeOvhqqpKRNd4mkIsA= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Joseph Turner To: Philip Kaludercic Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Sat, 13 May 2023 09:38:11 -0700 In-reply-to: <875y8waaj4.fsf@posteo.net> Message-ID: <87r0rkrxra.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-package-vc-build-documentation-Relative-include-.patch >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 -- 2.39.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat May 13 13:14:23 2023 Received: (at 63337) by debbugs.gnu.org; 13 May 2023 17:14:23 +0000 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 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 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== 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) From: Philip Kaludercic To: Joseph Turner Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements In-Reply-To: <87r0rkrxra.fsf@breatheoutbreathe.in> (Joseph Turner's message of "Sat, 13 May 2023 09:38:11 -0700") References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <875y8waaj4.fsf@posteo.net> <87r0rkrxra.fsf@breatheoutbreathe.in> 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 Date: Sat, 13 May 2023 17:14:13 +0000 Message-ID: <87zg68887u.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 From debbugs-submit-bounces@debbugs.gnu.org Sat May 13 13:18:03 2023 Received: (at control) by debbugs.gnu.org; 13 May 2023 17:18:03 +0000 Received: from localhost ([127.0.0.1]:39489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxssc-0002bz-L3 for submit@debbugs.gnu.org; Sat, 13 May 2023 13:18:03 -0400 Received: from mout01.posteo.de ([185.67.36.65]:43049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxssZ-0002bP-M1 for control@debbugs.gnu.org; Sat, 13 May 2023 13:18:01 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B763524002E for ; Sat, 13 May 2023 19:17:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683998273; bh=vs7XrjX6hDmikkP+nOdABtCD+jT5qriHs7jkyUSWyPM=; h=Date:Message-Id:To:From:Subject:From; b=kEN8XW6iLTyn24KRVEAQbwMLz8HrSr8WMVgpdRhhCOXPfokkJkBuQTPeDsuOUHT/V 8su4JIwshs3ma1kl0M9S85l9IMEtc78DJNdk4qOZ/0jRqyM1odiihS0QYVMKhLMvzo 8iYZPPNHMVBxwWJPUrlvXazn3Le6sPmG8h8CDGdeoN79CCdBI2ZUoTNxHAxTQbm0a1 UkjT5PbNOz84O64AJSfKwhQ8FoPFyiDgvYl+LCDGNht6DgZkRsibXdMCO+fc5fdBhA Ax3PxHiohE+GJrLIhkVbpKClq7cTvYckrEe3hJHGpyAkh5JF60XLhWscG0g+vheMum WqqdjWjl1dSYQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QJXQ92ZKkz9rxP for ; Sat, 13 May 2023 19:17:53 +0200 (CEST) Date: Sat, 13 May 2023 17:17:53 +0000 Message-Id: <87v8gw881q.fsf@posteo.net> To: control@debbugs.gnu.org From: Philip Kaludercic Subject: control message for bug #63337 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 63337 29.1 quit From debbugs-submit-bounces@debbugs.gnu.org Sat May 13 14:31:29 2023 Received: (at 63337) by debbugs.gnu.org; 13 May 2023 18:31:29 +0000 Received: from localhost ([127.0.0.1]:39578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxu1g-00076y-IK for submit@debbugs.gnu.org; Sat, 13 May 2023 14:31:28 -0400 Received: from out-8.mta0.migadu.com ([91.218.175.8]:24278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxu1d-00076p-Kk for 63337@debbugs.gnu.org; Sat, 13 May 2023 14:31:27 -0400 References: <87fs89qg9y.fsf@breatheoutbreathe.in> <87cz3cea4k.fsf@posteo.net> <87pm7c7zfs.fsf@breatheoutbreathe.in> <875y8waaj4.fsf@posteo.net> <87r0rkrxra.fsf@breatheoutbreathe.in> <87zg68887u.fsf@posteo.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=breatheoutbreathe.in; s=key1; t=1684002684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=e3CGQ+aWhjZ3UIaQ2ecpyMT8B+iOnCNBiNlTyFb6U50=; b=KC5g+A25WVscX0X6z6psXkF5gdQhxZjWxFj6nsbDMGnOyW04rfUqcBI4FjWu2UIb5C9ZM+ hEcG9rVO5YZS/EYqvgprJysYO/8WOZI/3nzHnN7qAU0c4BElmhpuW43LNJKGqX/b70tVI6 V+/jEhjUsml6Gmr5zhahAyNu68buAGg= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Joseph Turner To: Philip Kaludercic Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Date: Sat, 13 May 2023 11:31:08 -0700 In-reply-to: <87zg68887u.fsf@posteo.net> Message-ID: <87cz34rslj.fsf@breatheoutbreathe.in> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Flow: FLOW_OUT X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 63337 Cc: 63337@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip Kaludercic writes: > 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. Great! Thank you!! > >> 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 From unknown Sun Aug 17 10:16:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 11 Jun 2023 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator