From ae457e7dce5c7b4321a95589382311e8056e6743 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 28 Aug 2014 00:48:17 +0200 Subject: [PATCH] Fix exporting radio link with missing radio target * contrib/lisp/ox-groff.el (org-groff-link): * lisp/ox-beamer.el (org-beamer-link): * lisp/ox-html.el (org-html-link): * lisp/ox-latex.el (org-latex-link): * lisp/ox-odt.el (org-odt-link): When radio link has no valid target (e.g., this is a subtree export and the radio target is not in the exported subtree), simply return contents. Thanks to Daniel Clement for reporting it. http://permalink.gmane.org/gmane.emacs.orgmode/90218 --- contrib/lisp/ox-groff.el | 2 +- lisp/ox-beamer.el | 2 +- lisp/ox-html.el | 2 +- lisp/ox-latex.el | 2 +- lisp/ox-odt.el | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/lisp/ox-groff.el b/contrib/lisp/ox-groff.el index 8484def38..b3e3ad3fd 100644 --- a/contrib/lisp/ox-groff.el +++ b/contrib/lisp/ox-groff.el @@ -1268,7 +1268,7 @@ INFO is a plist holding contextual information. See ;; description. ((string= type "radio") (let ((destination (org-export-resolve-radio-link link info))) - (when destination + (if (not destination) desc (format "\\fI [%s] \\fP" (org-export-solidify-link-text (org-element-property :value destination)))))) diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 1d487e9e8..5ab805db2 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -687,7 +687,7 @@ used as a communication channel." (cond ((equal type "radio") (let ((destination (org-export-resolve-radio-link link info))) - (when destination + (if (not destination) contents (format "\\hyperlink%s{%s}{%s}" (or (org-beamer--element-has-overlay-p link) "") (org-export-solidify-link-text diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 3eaeb0af4..b04febeb6 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2720,7 +2720,7 @@ INFO is a plist holding contextual information. See ;; link's description. ((string= type "radio") (let ((destination (org-export-resolve-radio-link link info))) - (when destination + (if (not destination) desc (format "%s" (org-export-solidify-link-text (org-element-property :value destination)) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 5f171da00..f2ae463d5 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1809,7 +1809,7 @@ INFO is a plist holding contextual information. See ;; description. ((string= type "radio") (let ((destination (org-export-resolve-radio-link link info))) - (when destination + (if (not destination) desc (format "\\hyperref[%s]{%s}" (org-export-solidify-link-text (org-element-property :value destination)) diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index 6640e8aba..03b3214a4 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -2733,7 +2733,7 @@ INFO is a plist holding contextual information. See ;; link's description. ((string= type "radio") (let ((destination (org-export-resolve-radio-link link info))) - (when destination + (if (not destination) desc (format "%s" (org-export-solidify-link-text -- 2.11.4.GIT