Function: org-export-resolve-link
org-export-resolve-link is a byte-compiled function defined in
ox.el.gz.
Signature
(org-export-resolve-link LINK INFO)
Documentation
Return LINK destination.
LINK is a string or a link object.
INFO is a plist holding contextual information.
Return value can be an object or an element:
- If LINK path matches an ID or a custom ID, return the headline.
- If LINK path matches a fuzzy link, return its destination.
- Otherwise, throw an error.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox.el.gz
(defun org-export-resolve-link (link info)
"Return LINK destination.
LINK is a string or a link object.
INFO is a plist holding contextual information.
Return value can be an object or an element:
- If LINK path matches an ID or a custom ID, return the headline.
- If LINK path matches a fuzzy link, return its destination.
- Otherwise, throw an error."
;; Convert string links to link objects.
(when (stringp link)
(setq link (with-temp-buffer
(save-excursion
(insert (org-link-make-string link)))
(org-element-link-parser))))
(pcase (org-element-property :type link)
((or "custom-id" "id") (org-export-resolve-id-link link info))
("fuzzy" (org-export-resolve-fuzzy-link link info))
(_ (signal 'org-link-broken (list (org-element-property :path link))))))