Function: embark-open-externally
embark-open-externally is an interactive and natively compiled
function defined in embark.el.
Signature
(embark-open-externally FILE)
Documentation
Open FILE or url using system's default application.
Key Bindings
embark-bookmark-map x embark-buffer-map x embark-file-map x embark-library-map x embark-url-map x
Source Code
;; Defined in /nix/store/lls066p88vbzffl5j0d16jbhwpn2zfz2-emacs-packages-deps/share/emacs/site-lisp/elpa/embark-20260610.302/embark.el
(defun embark-open-externally (file)
"Open FILE or url using system's default application."
(interactive "sOpen externally: ")
(unless (string-match-p "\\`[a-z]+://" file)
(setq file (expand-file-name file)))
(message "Opening `%s' externally..." file)
(if (and (eq system-type 'windows-nt)
(fboundp 'w32-shell-execute))
(w32-shell-execute "open" file)
(call-process (pcase system-type
('darwin "open")
('cygwin "cygstart")
(_ "xdg-open"))
nil 0 nil file)))