* lisp/ol.el (org-link-open-as-file): Document function arguments

This commit is contained in:
Ihor Radchenko 2023-10-23 12:33:29 +03:00
parent 154ef34107
commit 20ab29117c
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 4 additions and 2 deletions

View File

@ -1334,9 +1334,11 @@ priority cookie or tag."
(org-link--normalize-string
(or string (org-get-heading t t t t)))))
(defun org-link-open-as-file (path arg)
(defun org-link-open-as-file (path in-emacs)
"Pretend PATH is a file name and open it.
IN-EMACS is passed to `org-open-file'.
According to \"file\"-link syntax, PATH may include additional
search options, separated from the file name with \"::\".
@ -1350,7 +1352,7 @@ This function is meant to be used as a possible tool for
(dired file-name)
(apply #'org-open-file
file-name
arg
in-emacs
(cond ((not option) nil)
((string-match-p "\\`[0-9]+\\'" option)
(list (string-to-number option)))