On 19/10/2022 17:36, Ihor Radchenko wrote:

--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -2737,6 +2737,12 @@ (defun org-odt-link (link desc info)
           (format "<text:a xlink:type=\"simple\" 
xlink:href=\"#%s\">%s</text:a>"
                   (org-export-get-reference destination info)
                   (or desc (org-export-get-ordinal destination info))))
+          ;; Link to a file, corresponding to string return value of
+          ;; `org-export-resolve-id-link'.
+          (plain-text
+           (format "<text:a xlink:type=\"simple\" 
xlink:href=\"%s\">%s</text:a>"
+                  destination
+                  (or desc (org-export-get-ordinal destination info))))

I am apologizing if my comments make no sense. I remember a thread on improper handling on id links in ox-html, so I am a bit surprised that a link to the whole file (if I got the goal of the patch correctly, of course) is the only problem with ODT.

- ox-html may transform file suffix from .org to .html. Have I missed the same code for ox-odt? - Doesn't destination should be passed through some quoting-escaping function to avoid characters in file names that may make XML invalid? (Perhaps id links between .org files will be broken earlier.)

Max Nikulin. Re: Internal link broken when publishing (was org-id with ox-html) Tue, 14 Sep 2021 23:33:43 +0700. https://list.orgmode.org/shqit9$8ds$1...@ciao.gmane.io



Reply via email to