Function: org-mobile-locate-entry

org-mobile-locate-entry is a byte-compiled function defined in org-mobile.el.gz.

Signature

(org-mobile-locate-entry LINK)

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-mobile.el.gz
(defun org-mobile-locate-entry (link)
  (if (string-match "\\`id:\\(.*\\)$" link)
      (org-id-find (match-string 1 link) 'marker)
    (if (not (string-match "\\`olp:\\(.*?\\):\\(.*\\)$" link))
					; not found with path, but maybe it is to be inserted
					; in top level of the file?
	(if (not (string-match "\\`olp:\\(.*?\\)$" link))
	    nil
	  (let ((file (match-string 1 link)))
	    (setq file (org-link-decode file))
	    (setq file (expand-file-name file org-directory))
	    (save-excursion
	      (find-file file)
	      (goto-char (point-max))
	      (newline)
	      (goto-char (point-max))
	      (point-marker))))
      (let ((file (match-string 1 link))
	    (path (match-string 2 link)))
	(setq file (org-link-decode file))
	(setq file (expand-file-name file org-directory))
	(setq path (mapcar #'org-link-decode
			   (org-split-string path "/")))
	(org-find-olp (cons file path))))))