unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#65243: [PATCH] Fix building of VC package manuals with relative org links/includes
@ 2023-08-12  8:43 Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-14  8:14 ` Philip Kaludercic
  2023-08-19  9:46 ` Philip Kaludercic
  0 siblings, 2 replies; 5+ messages in thread
From: Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-12  8:43 UTC (permalink / raw)
  To: 65243; +Cc: philipk

[-- Attachment #1: Type: text/plain, Size: 312 bytes --]

Hello,

This patch allows for relative includes and link in org files compiled
to texinfo.

Unfortunately, I missed this back in May
(commit 1e6a7594 ), when we fixed relative texi @include links.

I'm not sure how the Emacs release cycle works. Would it be possible to
include this fix in 29.2?

Best,

Joseph


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-building-of-VC-package-manuals-with-relative-org.patch --]
[-- Type: text/x-diff, Size: 1170 bytes --]

From e951b0ea4ffa90202ecee934eddd895b706c6794 Mon Sep 17 00:00:00 2001
From: Joseph Turner <joseph@breatheoutbreathe.in>
Date: Sat, 12 Aug 2023 01:40:07 -0700
Subject: [PATCH] Fix building of VC package manuals with relative org
 links/includes

* lisp/emacs-lisp/package-vc.el (package-vc--build-documentation):
Ensure that default-default is the docs-directory around
org-export-to-file to ensure that links to relative files work correctly.
---
 lisp/emacs-lisp/package-vc.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index b4c911015b5..ffc7afeb2ee 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -356,7 +356,8 @@ otherwise it's assumed to be an Info file."
       (with-temp-buffer
         (insert-file-contents file)
         (setq file (make-temp-file "ox-texinfo-"))
-        (org-export-to-file 'texinfo file)
+        (let ((default-directory docs-directory))
+          (org-export-to-file 'texinfo file))
         (setq clean-up t)))
     (with-current-buffer (get-buffer-create " *package-vc doc*")
       (erase-buffer)
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#65243: [PATCH] Fix building of VC package manuals with relative org links/includes
  2023-08-12  8:43 bug#65243: [PATCH] Fix building of VC package manuals with relative org links/includes Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-14  8:14 ` Philip Kaludercic
  2023-08-14 12:11   ` Eli Zaretskii
  2023-08-15  1:57   ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-19  9:46 ` Philip Kaludercic
  1 sibling, 2 replies; 5+ messages in thread
From: Philip Kaludercic @ 2023-08-14  8:14 UTC (permalink / raw)
  To: Joseph Turner; +Cc: 65243

Joseph Turner <joseph@breatheoutbreathe.in> writes:

> Hello,
>
> This patch allows for relative includes and link in org files compiled
> to texinfo.
>
> Unfortunately, I missed this back in May
> (commit 1e6a7594 ), when we fixed relative texi @include links.
>
> I'm not sure how the Emacs release cycle works. Would it be possible to
> include this fix in 29.2?

I wouldn't have any issue with that, and AFAIU now that the release has
been cut, this should be fine, as this is just a bug fix.

BTW, what package is this related to?

> Best,
>
> Joseph
>
>>From e951b0ea4ffa90202ecee934eddd895b706c6794 Mon Sep 17 00:00:00 2001
> From: Joseph Turner <joseph@breatheoutbreathe.in>
> Date: Sat, 12 Aug 2023 01:40:07 -0700
> Subject: [PATCH] Fix building of VC package manuals with relative org
>  links/includes
>
> * lisp/emacs-lisp/package-vc.el (package-vc--build-documentation):
> Ensure that default-default is the docs-directory around
> org-export-to-file to ensure that links to relative files work correctly.
> ---
>  lisp/emacs-lisp/package-vc.el | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
> index b4c911015b5..ffc7afeb2ee 100644
> --- a/lisp/emacs-lisp/package-vc.el
> +++ b/lisp/emacs-lisp/package-vc.el
> @@ -356,7 +356,8 @@ otherwise it's assumed to be an Info file."
>        (with-temp-buffer
>          (insert-file-contents file)
>          (setq file (make-temp-file "ox-texinfo-"))
> -        (org-export-to-file 'texinfo file)
> +        (let ((default-directory docs-directory))
> +          (org-export-to-file 'texinfo file))
>          (setq clean-up t)))
>      (with-current-buffer (get-buffer-create " *package-vc doc*")
>        (erase-buffer)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#65243: [PATCH] Fix building of VC package manuals with relative org links/includes
  2023-08-14  8:14 ` Philip Kaludercic
@ 2023-08-14 12:11   ` Eli Zaretskii
  2023-08-15  1:57   ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2023-08-14 12:11 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: 65243, joseph

> Cc: 65243@debbugs.gnu.org
> From: Philip Kaludercic <philipk@posteo.net>
> Date: Mon, 14 Aug 2023 08:14:31 +0000
> 
> Joseph Turner <joseph@breatheoutbreathe.in> writes:
> 
> > I'm not sure how the Emacs release cycle works. Would it be possible to
> > include this fix in 29.2?
> 
> I wouldn't have any issue with that, and AFAIU now that the release has
> been cut, this should be fine, as this is just a bug fix.

Fine by me, thanks.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#65243: [PATCH] Fix building of VC package manuals with relative org links/includes
  2023-08-14  8:14 ` Philip Kaludercic
  2023-08-14 12:11   ` Eli Zaretskii
@ 2023-08-15  1:57   ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 5+ messages in thread
From: Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-15  1:57 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: 65243


Philip Kaludercic <philipk@posteo.net> writes:

> Joseph Turner <joseph@breatheoutbreathe.in> writes:
>
>> Hello,
>>
>> This patch allows for relative includes and link in org files compiled
>> to texinfo.
>
> BTW, what package is this related to?

On my machine,

(package-vc-install '(hyperdrive
                      :url "https://git.sr.ht/~ushin/hyperdrive.el"
                      :doc "doc/hyperdrive-manual.org"))

gives the following backtrace:

Debugger entered--Lisp error: (error "Cannot include file /home/joseph/.emacs.d/elpa/hyperdrive/fdl.org")
  error("Cannot include file %s" "/home/joseph/.emacs.d/elpa/hyperdrive/fdl.org")
  org-export-expand-include-keyword()
  org-export-as(texinfo nil nil nil (:output-file "/tmp/ox-texinfo-hqSZfl"))
  org-export-to-file(texinfo "/tmp/ox-texinfo-hqSZfl")
  package-vc--build-documentation(#s(package-desc :name hyperdrive :version nil :summary "No description available." :reqs nil :kind vc :archive nil :dir "/home/joseph/.emacs.d/elpa/hyperdrive/" :extras nil :signed nil) "doc/hyperdrive-manual.org")
  package-vc--unpack-1(#s(package-desc :name hyperdrive :version nil :summary "No description available." :reqs nil :kind vc :archive nil :dir "/home/joseph/.emacs.d/elpa/hyperdrive/" :extras nil :signed nil) "/home/joseph/.emacs.d/elpa/hyperdrive/")
  package-vc--unpack(#s(package-desc :name hyperdrive :version nil :summary "No description available." :reqs nil :kind vc :archive nil :dir "/home/joseph/.emacs.d/elpa/hyperdrive/" :extras nil :signed nil) (:url "https://git.sr.ht/~ushin/hyperdrive.el" :doc "doc/hyperdrive-manual.org") nil)
  package-vc-install((hyperdrive :url "https://git.sr.ht/~ushin/hyperdrive.el" :doc "doc/hyperdrive-manual.org"))

"/home/joseph/.emacs.d/elpa/hyperdrive/fdl.org" does not exist, but
"/home/joseph/.emacs.d/elpa/hyperdrive/doc/fdl.org" does.

Hope this helps!

Joseph





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#65243: [PATCH] Fix building of VC package manuals with relative org links/includes
  2023-08-12  8:43 bug#65243: [PATCH] Fix building of VC package manuals with relative org links/includes Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-14  8:14 ` Philip Kaludercic
@ 2023-08-19  9:46 ` Philip Kaludercic
  1 sibling, 0 replies; 5+ messages in thread
From: Philip Kaludercic @ 2023-08-19  9:46 UTC (permalink / raw)
  To: Joseph Turner; +Cc: 65243-done

Joseph Turner <joseph@breatheoutbreathe.in> writes:

> Hello,
>
> This patch allows for relative includes and link in org files compiled
> to texinfo.
>
> Unfortunately, I missed this back in May
> (commit 1e6a7594 ), when we fixed relative texi @include links.
>
> I'm not sure how the Emacs release cycle works. Would it be possible to
> include this fix in 29.2?

I have applies the patch to emacs-29, and will close the report.  Thanks!

> Best,
>
> Joseph





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-19  9:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-12  8:43 bug#65243: [PATCH] Fix building of VC package manuals with relative org links/includes Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-14  8:14 ` Philip Kaludercic
2023-08-14 12:11   ` Eli Zaretskii
2023-08-15  1:57   ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-19  9:46 ` Philip Kaludercic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).