Function: dnd-open-file
dnd-open-file is a byte-compiled function defined in dnd.el.gz.
Signature
(dnd-open-file URI ACTION)
Documentation
Open a local or remote file.
The file is opened in the current window, or a new window if
dnd-open-file-other-window is set. URI is the url for the file,
and must have the format file://hostname/file-name. ACTION is ignored.
The last / in file://hostname/ is part of the file name.
This function has :around advice: org--mouse-dnd-open-file.
Source Code
;; Defined in /usr/src/emacs/lisp/dnd.el.gz
(defun dnd-open-file (uri action)
"Open a local or remote file.
The file is opened in the current window, or a new window if
`dnd-open-file-other-window' is set. URI is the url for the file,
and must have the format file://hostname/file-name. ACTION is ignored.
The last / in file://hostname/ is part of the file name."
;; The hostname may be our hostname, in that case, convert to a local
;; file. Otherwise return nil.
(let ((local-file (dnd-get-local-file-uri uri)))
(if local-file (dnd-open-local-file local-file action)
(if dnd-open-remote-file-function
(funcall dnd-open-remote-file-function uri action)
(error "Remote files not supported")))))