From: Philip Kaludercic <philipk@posteo.net>
To: Joseph Turner <joseph@breatheoutbreathe.in>
Cc: 63337@debbugs.gnu.org
Subject: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements
Date: Sat, 13 May 2023 17:14:13 +0000 [thread overview]
Message-ID: <87zg68887u.fsf@posteo.net> (raw)
In-Reply-To: <87r0rkrxra.fsf@breatheoutbreathe.in> (Joseph Turner's message of "Sat, 13 May 2023 09:38:11 -0700")
Joseph Turner <joseph@breatheoutbreathe.in> writes:
> Philip Kaludercic <philipk@posteo.net> writes:
>
>> Joseph Turner <joseph@breatheoutbreathe.in> writes:
>>
>>> Philip Kaludercic <philipk@posteo.net> writes:
>>>
>>>> Joseph Turner <joseph@breatheoutbreathe.in> 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 <joseph@breatheoutbreathe.in>
> 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
next prev parent reply other threads:[~2023-05-13 17:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-06 20:54 bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-07 9:58 ` Philip Kaludercic
2023-05-07 10:56 ` Eli Zaretskii
2023-05-07 18:40 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-07 19:11 ` Eli Zaretskii
2023-05-07 19:19 ` Philip Kaludercic
2023-05-07 20:29 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-08 13:51 ` Philip Kaludercic
2023-05-08 19:05 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-09 1:34 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-09 2:48 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-09 4:36 ` Eli Zaretskii
2023-05-09 23:49 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-10 6:51 ` Philip Kaludercic
2023-05-11 2:04 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-12 6:51 ` Philip Kaludercic
2023-05-12 7:14 ` Eli Zaretskii
2023-05-12 7:35 ` Philip Kaludercic
2023-05-13 5:54 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-12 6:56 ` Philip Kaludercic
2023-05-13 5:47 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-13 8:41 ` Philip Kaludercic
2023-05-13 16:38 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-13 17:14 ` Philip Kaludercic [this message]
2023-05-13 18:31 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zg68887u.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=63337@debbugs.gnu.org \
--cc=joseph@breatheoutbreathe.in \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.