forked from mirrors/org-mode
Merge branch 'master' of orgmode.org:org-mode
This commit is contained in:
commit
3abea32044
|
@ -3059,12 +3059,9 @@ Assume point is at the beginning of the link."
|
||||||
;; Type 1: Text targeted from a radio target.
|
;; Type 1: Text targeted from a radio target.
|
||||||
((and org-target-link-regexp (looking-at org-target-link-regexp))
|
((and org-target-link-regexp (looking-at org-target-link-regexp))
|
||||||
(setq type "radio"
|
(setq type "radio"
|
||||||
contents-begin (match-beginning 0)
|
link-end (match-end 0)
|
||||||
contents-end (match-end 0)
|
path (org-match-string-no-properties 0)))
|
||||||
link-end contents-end
|
;; Type 2: Standard link, i.e. [[http://orgmode.org][homepage]]
|
||||||
raw-link (org-match-string-no-properties 0)
|
|
||||||
path (downcase raw-link)))
|
|
||||||
;; Type 2: Standard link, e.g. [[http://orgmode.org][homepage]]
|
|
||||||
((looking-at org-bracket-link-regexp)
|
((looking-at org-bracket-link-regexp)
|
||||||
(setq contents-begin (match-beginning 3)
|
(setq contents-begin (match-beginning 3)
|
||||||
contents-end (match-end 3)
|
contents-end (match-end 3)
|
||||||
|
@ -3232,8 +3229,8 @@ beginning position."
|
||||||
"Parse radio target at point.
|
"Parse radio target at point.
|
||||||
|
|
||||||
Return a list whose CAR is `radio-target' and CDR a plist with
|
Return a list whose CAR is `radio-target' and CDR a plist with
|
||||||
`:value', `:raw-value', `:begin', `:end', `:contents-begin',
|
`:begin', `:end', `:contents-begin', `:contents-end', `:value'
|
||||||
`:contents-end', and `:post-blank' as keywords.
|
and `:post-blank' as keywords.
|
||||||
|
|
||||||
Assume point is at the radio target."
|
Assume point is at the radio target."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
|
@ -3241,18 +3238,17 @@ Assume point is at the radio target."
|
||||||
(let ((begin (point))
|
(let ((begin (point))
|
||||||
(contents-begin (match-beginning 1))
|
(contents-begin (match-beginning 1))
|
||||||
(contents-end (match-end 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))
|
(post-blank (progn (goto-char (match-end 0))
|
||||||
(skip-chars-forward " \t")))
|
(skip-chars-forward " \t")))
|
||||||
(end (point)))
|
(end (point)))
|
||||||
(list 'radio-target
|
(list 'radio-target
|
||||||
(list :value (downcase raw-value)
|
(list :begin begin
|
||||||
:raw-value raw-value
|
|
||||||
:begin begin
|
|
||||||
:end end
|
:end end
|
||||||
:contents-begin contents-begin
|
:contents-begin contents-begin
|
||||||
:contents-end contents-end
|
:contents-end contents-end
|
||||||
:post-blank post-blank)))))
|
:post-blank post-blank
|
||||||
|
:value value)))))
|
||||||
|
|
||||||
(defun org-element-radio-target-interpreter (target contents)
|
(defun org-element-radio-target-interpreter (target contents)
|
||||||
"Interpret TARGET object as Org syntax.
|
"Interpret TARGET object as Org syntax.
|
||||||
|
|
|
@ -1386,8 +1386,12 @@ INFO is a plist holding contextual information."
|
||||||
(let ((ref (org-element-property :path link)))
|
(let ((ref (org-element-property :path link)))
|
||||||
(format (org-export-get-coderef-format ref desc)
|
(format (org-export-get-coderef-format ref desc)
|
||||||
(org-export-resolve-coderef ref info))))
|
(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
|
||||||
((string= type "radio") desc)
|
;; 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
|
;; Do not apply a special syntax on fuzzy links pointing to
|
||||||
;; targets.
|
;; targets.
|
||||||
((string= type "fuzzy")
|
((string= type "fuzzy")
|
||||||
|
|
Loading…
Reference in New Issue