From d2e7b1b5b168454aec99aed1ab3af83dd1f7f941 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Mon, 17 Mar 2014 02:58:02 +0100 Subject: [PATCH] Fix links to radio targets. * ox-latex.el (org-latex-link): * ox-html.el (org-html-link): * ox-beamer.el (org-beamer-link): Fix links to radio targets. * ox-ascii.el (org-ascii-link): For links to a radio target, use the link, not the target. Thanks to Noah Slater for reporting this. --- lisp/ox-ascii.el | 7 ++----- lisp/ox-beamer.el | 4 ++-- lisp/ox-html.el | 4 ++-- lisp/ox-latex.el | 4 ++-- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index e8f1b1f41..53bd2cb19 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -1385,12 +1385,9 @@ INFO is a plist holding contextual information." (let ((ref (org-element-property :path link))) (format (org-export-get-coderef-format ref desc) (org-export-resolve-coderef ref info)))) - ;; Do not apply a special syntax on radio links. Though, use - ;; transcoded target's contents as output. + ;; Do not apply a special syntax on radio links. ((string= type "radio") - (let ((destination (org-export-resolve-radio-link link info))) - (when destination - (org-export-data (org-element-contents destination) info)))) + (org-element-property :path link)) ;; Do not apply a special syntax on fuzzy links pointing to ;; targets. ((string= type "fuzzy") diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 3102b622d..a86b43428 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -690,8 +690,8 @@ used as a communication channel." (when destination (format "\\hyperlink%s{%s}{%s}" (or (org-beamer--element-has-overlay-p link) "") - (org-export-solidify-link-text path) - (org-export-data (org-element-contents destination) info))))) + (org-export-data (org-element-contents destination) info) + (org-export-solidify-link-text path))))) ((and (member type '("custom-id" "fuzzy" "id")) (let ((destination (if (string= type "fuzzy") (org-export-resolve-fuzzy-link link info) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index cabf2b684..02cc061a0 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2721,9 +2721,9 @@ INFO is a plist holding contextual information. See (let ((destination (org-export-resolve-radio-link link info))) (when destination (format "%s" - (org-export-solidify-link-text path) + (org-export-data (org-element-contents destination) info) attributes - (org-export-data (org-element-contents destination) info))))) + (org-export-solidify-link-text path))))) ;; Links pointing to a headline: Find destination and build ;; appropriate referencing command. ((member type '("custom-id" "fuzzy" "id")) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 19f055e7d..b3f2a8dfd 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1800,8 +1800,8 @@ INFO is a plist holding contextual information. See (let ((destination (org-export-resolve-radio-link link info))) (when destination (format "\\hyperref[%s]{%s}" - (org-export-solidify-link-text path) - (org-export-data (org-element-contents destination) info))))) + (org-export-data (org-element-contents destination) info) + (org-export-solidify-link-text path))))) ;; Links pointing to a headline: Find destination and build ;; appropriate referencing command. ((member type '("custom-id" "fuzzy" "id"))