I\'m trying to tweak the dired-find-file
function in emacs on Windows XP so that when I open (say) a pdf file from dired it fires up a copy of Acrobat Reader and op
I'd use (w32-shell-execute "open" file-name)
.
In fact, in my init file I have:
(defun open-externally (file-name)
(interactive "fOpen externally: ")
(let ((process-connection-type nil))
(start-process "open-externally" nil
"xdg-open" file-name)))
(when (eq window-system 'w32)
(defun open-externally (file-name)
(interactive "fOpen externally: ")
(w32-shell-execute "open" file-name)))
Which defines a command that (may be used interactively and) opens a file with the default application according to xdg-open
and then, if I'm actually on Windows, redefines that command appropriately.