(dired-mode-immediate-menu): Add menu item "Display Externally"
for 'dired-do-open'.
* lisp/dired-aux.el (dired-do-open): Add autoload cookie.
(cherry picked from commit
9ebe6aa5f1092241a98e0a16db918e3dc1062f1c)
that delegates to the OS.
*** New command 'dired-do-open'.
-This command is bound to "Open" in the context menu; it "opens" the
-marked or clicked on files according to the OS conventions. For
-example, on systems supporting XDG, this runs 'xdg-open' on the
-files.
+This command is bound to 'E' (mnemonics "External"). Also it can be
+used by clicking "Open" in the context menu; it "opens" the marked or
+clicked on files according to the OS conventions. For example, on
+systems supporting XDG, this runs 'xdg-open' on the files.
*** New variable 'dired-guess-shell-alist-optional'.
It contains commands for external viewers and players for various media
(declare-function w32-shell-execute "w32fns.c")
+;;;###autoload
(defun dired-do-open (&optional arg)
"Open all marked (or next ARG) files using an external program.
This \"opens\" the file(s) using the external command that is most
"~" #'dired-flag-backup-files
;; Upper case keys (except !) for operating on the marked files
"A" #'dired-do-find-regexp
- "C" #'dired-do-copy
"B" #'dired-do-byte-compile
+ "C" #'dired-do-copy
"D" #'dired-do-delete
+ "E" #'dired-do-open
"G" #'dired-do-chgrp
"H" #'dired-do-hardlink
"I" #'dired-do-info
["Display Image" image-dired-dired-display-image
:help "Display sized image in a separate window"]
["Display Image Externally" image-dired-dired-display-external
- :help "Display image in external viewer"]))
+ :help "Display image in external viewer"]
+ ["Display Externally" dired-do-open
+ :help "Display file in external viewer"]))
(easy-menu-define dired-mode-regexp-menu dired-mode-map
"Regexp menu for Dired mode."