Subject: Re: bug#63337: [PATCH] package-vc--build-documentation: Fix relative @include statements

From: Joseph Turner <[email-masked]>
Date: Fri, 12 May 2023 22:47:11 -0700

Philip Kaludercic <[email-masked]> 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)))
>         ((/= 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))))
>
>
> While the entry does appear in (dir) Top, the file cannot be opened:
>
>   Info-find-file: Info file ‘org-transclusion’ does not exist; consider installing it

IIUC, you're saying that default-directory needs to be (package-desc-dir pkg-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.