浏览代码

Revert "Fix links to radio targets."

This reverts commit d2e7b1b5b168454aec99aed1ab3af83dd1f7f941.
Nicolas Goaziou 11 年之前
父节点
当前提交
44095d483b
共有 4 个文件被更改,包括 11 次插入8 次删除
  1. 5 2
      lisp/ox-ascii.el
  2. 2 2
      lisp/ox-beamer.el
  3. 2 2
      lisp/ox-html.el
  4. 2 2
      lisp/ox-latex.el

+ 5 - 2
lisp/ox-ascii.el

@@ -1385,9 +1385,12 @@ 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.
+     ;; Do not apply a special syntax on radio links.  Though, use
+     ;; transcoded target's contents as output.
      ((string= type "radio")
-      (org-element-property :path link))
+      (let ((destination (org-export-resolve-radio-link link info)))
+	(when destination
+	  (org-export-data (org-element-contents destination) info))))
      ;; Do not apply a special syntax on fuzzy links pointing to
      ;; targets.
      ((string= type "fuzzy")

+ 2 - 2
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-data (org-element-contents destination) info)
-		  (org-export-solidify-link-text path)))))
+		  (org-export-solidify-link-text path)
+		  (org-export-data (org-element-contents destination) info)))))
      ((and (member type '("custom-id" "fuzzy" "id"))
 	   (let ((destination (if (string= type "fuzzy")
 				  (org-export-resolve-fuzzy-link link info)

+ 2 - 2
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 "<a href=\"#%s\"%s>%s</a>"
-		  (org-export-data (org-element-contents destination) info)
+		  (org-export-solidify-link-text path)
 		  attributes
-		  (org-export-solidify-link-text path)))))
+		  (org-export-data (org-element-contents destination) info)))))
      ;; Links pointing to a headline: Find destination and build
      ;; appropriate referencing command.
      ((member type '("custom-id" "fuzzy" "id"))

+ 2 - 2
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-data (org-element-contents destination) info)
-		  (org-export-solidify-link-text path)))))
+		  (org-export-solidify-link-text path)
+		  (org-export-data (org-element-contents destination) info)))))
      ;; Links pointing to a headline: Find destination and build
      ;; appropriate referencing command.
      ((member type '("custom-id" "fuzzy" "id"))