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
This commit is contained in:
Nicolas Goaziou 2014-08-28 00:48:17 +02:00
parent 409913b253
commit ae457e7dce
5 changed files with 5 additions and 5 deletions

View File

@ -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))))))

View File

@ -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

View File

@ -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 "<a href=\"#%s\"%s>%s</a>"
(org-export-solidify-link-text
(org-element-property :value destination))

View File

@ -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))

View File

@ -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
"<text:bookmark-ref text:reference-format=\"text\" text:ref-name=\"OrgXref.%s\">%s</text:bookmark-ref>"
(org-export-solidify-link-text