Browse Source

ox-odt: Allow id: links to files

* lisp/ox-odt.el (org-odt-link): Transcode id: links to file property
drawers.

Reported-by: Moritz Schäfer <mail@moritzs.de>
Link: https://orgmode.org/list/CA+FVMQDBUwCQHFOWieELaB3=4MH2ybA66+NpCuQwvvv_1HVMzg@mail.gmail.com
Ihor Radchenko 1 year ago
parent
commit
4e5c737311
1 changed files with 6 additions and 0 deletions
  1. 6 0
      lisp/ox-odt.el

+ 6 - 0
lisp/ox-odt.el

@@ -2737,6 +2737,12 @@ INFO is a plist holding contextual information.  See
 	   (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))))
 	  ;; Fuzzy link points to some element (e.g., an inline image,
 	  ;; a math formula or a table).
 	  (otherwise