From: Eli Zaretskii Date: Thu, 23 May 2024 18:14:13 +0000 (+0300) Subject: Improve Dired context menu X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=81577b775201c233cc6dc5f23ff226e520f98d80;p=emacs.git Improve Dired context menu * lisp/dired.el (dired-context-menu): Add 'w32-shell-execute' menu item on MS-Windows. Improve help-echo. (cherry picked from commit e1789f66ac9ada9344fb22b2a191d61216f95459) --- diff --git a/lisp/dired.el b/lisp/dired.el index 28ec187e666..21085de97f2 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2642,7 +2642,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." :help "Edit file at mouse click in other window"] ,@(when shell-command-guess-open '(["Open" dired-do-open - :help "Open externally"])) + :help "Open this file with the default application"])) ,@(when commands (list (cons "Open With" (append @@ -2653,7 +2653,13 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." (interactive) (dired-do-async-shell-command ,command nil (list ,filename)))]) - commands))))))) + commands))))) + ,@(when (eq system-type 'windows-nt) + `(["Select system app" + (lambda () + (interactive) + (w32-shell-execute "openas" ,filename)) + :help "Choose one of the apps available on your system"])))) (dolist (item (reverse (lookup-key easy-menu [menu-bar immediate]))) (when (consp item) (define-key menu (vector (car item)) (cdr item))))))