Function: org-info--link-file-node
org-info--link-file-node is a byte-compiled function defined in
ol-info.el.gz.
Signature
(org-info--link-file-node PATH)
Documentation
Extract the file name and Info node from the Info link PATH.
Return a cons consisting of the file name and node name or "Top" if
the node part is not specified. Components may be separated by ":"
or by "#". The file name may be a virtual one, see
Info-virtual-files.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ol-info.el.gz
(defun org-info--link-file-node (path)
"Extract the file name and Info node from the Info link PATH.
Return a cons consisting of the file name and node name or \"Top\" if
the node part is not specified. Components may be separated by \":\"
or by \"#\". The file name may be a virtual one, see
`Info-virtual-files'."
(if (not path)
'("dir" . "Top")
(string-match "\\`\\([^#:]*\\)\\(?:[#:]:?\\(.*\\)\\)?\\'" path)
(let* ((node (match-string 2 path))
;; Do not reorder, `org-trim' modifies match.
(file (org-trim (match-string 1 path))))
(cons
(if (org-string-nw-p file) file "dir")
(if (org-string-nw-p node) (org-trim node) "Top")))))