|
| From: | Max Nikulin |
| Subject: | Re: [BUG] ox-odt fails for org-id links (e.g., from org-roam v2) [9.5.2 (9.5.2-gfbff08 @ /home/moritz/.emacs.d/elpa/27.2/develop/org-9.5.2/)] |
| Date: | Thu, 20 Oct 2022 17:09:42 +0700 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 |
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
| [Prev in Thread] | Current Thread | [Next in Thread] |