[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 2f5e7103e5 4/4: ox-odt: Improve link generation in
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 2f5e7103e5 4/4: ox-odt: Improve link generation in 4e5c737311 |
Date: |
Sat, 22 Oct 2022 00:58:05 -0400 (EDT) |
branch: externals/org
commit 2f5e7103e59f06631e985d3dd39af21b5b7464ea
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
ox-odt: Improve link generation in 4e5c737311
* lisp/ox-odt.el (org-odt-link): Use file: link code branch when
exporting id: links to document property drawers. Call `org-odt-link'
with equivalent file: link instead of duplicating the existing code.
Reported-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/tiubca$1252$1@ciao.gmane.io
---
lisp/ox-odt.el | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index e171a90ab9..df6cfed642 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -2738,11 +2738,15 @@ INFO is a plist holding contextual information. See
(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'.
+ ;; `org-export-resolve-id-link'. Export it is file link.
(plain-text
- (format "<text:a xlink:type=\"simple\"
xlink:href=\"%s\">%s</text:a>"
- destination
- (or desc (org-export-get-ordinal destination info))))
+ (let ((file-link (org-element-copy link)))
+ (org-element-put-property file-link :type "file")
+ (org-element-put-property file-link :path destination)
+ (org-element-put-property
+ file-link
+ :raw-link (format "file:%s" destination))
+ (org-odt-link file-link desc info)))
;; Fuzzy link points to some element (e.g., an inline image,
;; a math formula or a table).
(otherwise