openwith seems to kill replying in
Is there a similar/alternative solution for easy defining default apps per extensions in
You might find that dired-launch is of some value. I developed it as a launcher specifically for dired-mode (unlike
openwith... which tries to work in a variety of settings).
dired-launch provides a keybinding (
J) which allows one to launch the default external application corresponding to that file.
Yes, vanilla Dired has help for this, and Dired+ provides some more help.
You can use
! on a file (or marked files) to run a shell program on it. Use
M-n to cycle among possible commands. These commands to choose from come from the MIME type of the file (see non-option variable
mailcap-mime-data). They can also come from entries that you make in user option
dired-guess-shell-alist-user (you will need to load standard library
dired-x.el for this).
If you use Emacs on MS Windows and you have both Dired+ and library
w32-browser.el (see Ms Shell Execute) then you can use
M-RET in Dired to open a file or directory using its Windows file association (i.e., its "open" program).
On Debian, this is how I do it:
(defun mu-open-in-external-app () "Open the file where point is or the marked files in Dired in external app. The app is chosen from your OS's preference." (interactive) (let* ((file-list (dired-get-marked-files))) (mapc (lambda (file-path) (let ((process-connection-type nil)) (start-process "" nil "xdg-open" file-path))) file-list)))
And then I have this:
(define-key dired-mode-map (kbd "C-<return>") #'mu-open-in-external-app)
You can bind
(define-key dired-mode-map (kbd "RET") #'mu-open-in-external-app)