From 0c4ab29d0aa8b320a2605ab15f6c5f30a4467c4b Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 20 Mar 2014 18:21:04 +0100 Subject: [PATCH 1/2] Revert "org-element: Fix radio-target and radio link parsing" This reverts commit 5174495ee6f8758109e6c009f8a351e79481d5b8. Conflicts: lisp/org-element.el --- lisp/org-element.el | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index 99bb93e21..9bb794428 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -3094,12 +3094,9 @@ Assume point is at the beginning of the link." ;; Type 1: Text targeted from a radio target. ((and org-target-link-regexp (looking-at org-target-link-regexp)) (setq type "radio" - contents-begin (match-beginning 0) - contents-end (match-end 0) - link-end contents-end - raw-link (org-match-string-no-properties 0) - path (downcase raw-link))) - ;; Type 2: Standard link, e.g. [[http://orgmode.org][homepage]] + link-end (match-end 0) + path (org-match-string-no-properties 0))) + ;; Type 2: Standard link, i.e. [[http://orgmode.org][homepage]] ((looking-at org-bracket-link-regexp) (setq contents-begin (match-beginning 3) contents-end (match-end 3) @@ -3267,8 +3264,8 @@ beginning position." "Parse radio target at point. Return a list whose CAR is `radio-target' and CDR a plist with -`:value', `:raw-value', `:begin', `:end', `:contents-begin', -`:contents-end', and `:post-blank' as keywords. +`:begin', `:end', `:contents-begin', `:contents-end', `:value' +and `:post-blank' as keywords. Assume point is at the radio target." (save-excursion @@ -3276,18 +3273,17 @@ Assume point is at the radio target." (let ((begin (point)) (contents-begin (match-beginning 1)) (contents-end (match-end 1)) - (raw-value (org-match-string-no-properties 1)) + (value (org-match-string-no-properties 1)) (post-blank (progn (goto-char (match-end 0)) (skip-chars-forward " \t"))) (end (point))) (list 'radio-target - (list :value (downcase raw-value) - :raw-value raw-value - :begin begin + (list :begin begin :end end :contents-begin contents-begin :contents-end contents-end - :post-blank post-blank))))) + :post-blank post-blank + :value value))))) (defun org-element-radio-target-interpreter (target contents) "Interpret TARGET object as Org syntax. From a97959984a28e912e865ec3c40ae1098a26cd439 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 20 Mar 2014 18:21:29 +0100 Subject: [PATCH 2/2] Revert "ox-ascii: Fix radio link" This reverts commit b4ffae0d096d155e76b37012fc0268f7ebe7aa70. --- lisp/ox-ascii.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index 031f4aac4..e8f1b1f41 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -1385,8 +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. - ((string= type "radio") desc) + ;; Do not apply a special syntax on radio links. Though, use + ;; transcoded target's contents as output. + ((string= type "radio") + (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")