Browse Source

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
Nicolas Goaziou 10 years ago
parent
commit
ae457e7dce
5 changed files with 5 additions and 5 deletions
  1. 1 1
      contrib/lisp/ox-groff.el
  2. 1 1
      lisp/ox-beamer.el
  3. 1 1
      lisp/ox-html.el
  4. 1 1
      lisp/ox-latex.el
  5. 1 1
      lisp/ox-odt.el

+ 1 - 1
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))))))

+ 1 - 1
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

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

+ 1 - 1
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))

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