From: Manuel Giraud Date: Fri, 6 Sep 2024 07:47:33 +0000 (+0200) Subject: Make `dired-do-open' work on more *nix systems X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d1219a1cff5911882baa054012ada5225547981a;p=emacs.git Make `dired-do-open' work on more *nix systems * lisp/dired-aux.el (dired-do-open): Make `dired-do-open' work on more *nix systems (bug#73004). (cherry picked from commit 5e377f4fcc0626065f930f68cff7a11f31c40ffe) --- diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 642633caf68..cf453a44a55 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1458,21 +1458,20 @@ system is determined by `shell-command-guess-open'." (when (and (memq system-type '(windows-nt)) (equal command "start")) (setq command "open")) - (when command - (dolist (file files) - (cond - ((memq system-type '(gnu/linux)) - (call-process command nil 0 nil file)) - ((memq system-type '(ms-dos)) - (shell-command (concat command " " (shell-quote-argument file)))) - ((memq system-type '(windows-nt)) - (w32-shell-execute command (convert-standard-filename file))) - ((memq system-type '(cygwin)) - (call-process command nil nil nil file)) - ((memq system-type '(darwin)) - (start-process (concat command " " file) nil command file)) - (t - (error "Open not supported on this system"))))))) + (if command + (dolist (file files) + (cond + ((memq system-type '(ms-dos)) + (shell-command (concat command " " (shell-quote-argument file)))) + ((memq system-type '(windows-nt)) + (w32-shell-execute command (convert-standard-filename file))) + ((memq system-type '(cygwin)) + (call-process command nil nil nil file)) + ((memq system-type '(darwin)) + (start-process (concat command " " file) nil command file)) + (t + (call-process command nil 0 nil file)))) + (error "Open not supported on this system")))) ;;; Commands that delete or redisplay part of the dired buffer