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 file name and node from info link PATH.
Return cons consisting of file name and node name or "Top" if node
part is not specified. Components may be separated by ":" or by "#".
File 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 file name and node from info link PATH.
Return cons consisting of file name and node name or \"Top\" if node
part is not specified. Components may be separated by \":\" or by \"#\".
File 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")))))