* lisp/dired.el (dired-mode-map): Bind "E" to 'dired-do-open' (bug#18132).

(dired-mode-immediate-menu): Add menu item "Display Externally"
for 'dired-do-open'.

* lisp/dired-aux.el (dired-do-open): Add autoload cookie.
This commit is contained in:
Juri Linkov 2024-05-24 20:55:30 +03:00
parent 74f15ad72d
commit 9ebe6aa5f1
3 changed files with 10 additions and 6 deletions

View file

@ -812,10 +812,10 @@ and a universal command such as "open" or "start"
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

View file

@ -1448,6 +1448,7 @@ This excludes `dired-guess-shell-alist-user' and
(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

View file

@ -2276,9 +2276,10 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
"~" #'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
@ -2483,7 +2484,9 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
["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."