Launch an external application from dired
dired-launch is a launcher for the Emacs dired-mode. In a nutshell, it lets you select a file and then launch an external application with that file.
-
Download
dired-launch.el
. -
Ensure emacs loads
dired-launch.el
. For example, you might add the following line to your~/.emacs
:(load "/path/to/dired-launch.el")
-
Enable the dired minor mode:
(dired-launch-enable)
-
If you prefer different key bindings, consider modifying them:
(define-key dired-launch-mode-map (kbd "l") 'dired-launch-command)
-
M-x
dired
-
Move the cursor to a file of interest
-
Launch:
J launches the file using the default application using
dired-launch-command
Change the preferred (default) application for a given file type by invoking mimeopen with the '-d' flag:
mimeopen -d myfile