]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/dired.el (dired-mode-map): Bind "E" to 'dired-do-open' (bug#18132).
authorJuri Linkov <juri@linkov.net>
Fri, 24 May 2024 17:55:30 +0000 (20:55 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 26 May 2024 05:52:26 +0000 (07:52 +0200)
(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)

etc/NEWS
lisp/dired-aux.el
lisp/dired.el

index 236a9d2525b6927bcafdff57842b35bf9bdac1ce..920d7c516cf49c43667308dd4e6fdb321b85c107 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -809,10 +809,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
index fcd1269529ad069e62a47afc86bc9666f518ff62..db86e2205bb2fd4c2396405bf98cee68df609b0d 100644 (file)
@@ -1437,6 +1437,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
index 2b1db9f6e3126b49640261e1a7aae46b85e943b8..f2a75df6ef1240ec3e0681331ea350e89c07bff4 100644 (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."