From 9b2c3c190acb26d7dd7393fed1079a21dd562f6f Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 13 Jan 2018 17:48:10 +0100 Subject: Fix Bug#29149 in shell.el * lisp/shell.el (shell): Change order of `file-local-name' and `expand-file-name' calls. Otherwise, the local file name would be extended by a drive letter, even when it is a remote file, seen from w32. (Bug#29149) --- lisp/shell.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/shell.el b/lisp/shell.el index f046d7830e6..5c228a5eba9 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -727,8 +727,8 @@ Otherwise, one argument `-i' is passed to the shell. (null explicit-shell-file-name) (null (getenv "ESHELL"))) (set (make-local-variable 'explicit-shell-file-name) - (expand-file-name - (file-local-name + (file-local-name + (expand-file-name (read-file-name "Remote shell path: " default-directory shell-file-name t shell-file-name))))))) -- cgit v1.2.1 From 7a81586bd7250b24704f755b825121b5d13c7774 Mon Sep 17 00:00:00 2001 From: Shuguang Sun Date: Sat, 13 Jan 2018 17:52:04 +0100 Subject: Fix Bug#29149 in dired-aux.el * lisp/dired-aux.el (dired-shell-stuff-it): Handle remote commands on w32 properly. (Bug#29149) --- lisp/dired-aux.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 0af68c1f1b2..79833eab288 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -794,15 +794,16 @@ can be produced by `dired-get-marked-files', for example." (and in-background (not sequentially) (not (eq system-type 'ms-dos)))) (w32-shell (and (fboundp 'w32-shell-dos-semantics) (w32-shell-dos-semantics))) + (file-remote (file-remote-p default-directory)) ;; The way to run a command in background in Windows shells ;; is to use the START command. The /B switch means not to ;; create a new window for the command. - (cmd-prefix (if w32-shell "start /b " "")) + (cmd-prefix (if (and w32-shell (not file-remote)) "start /b " "")) ;; Windows shells don't support chaining with ";", they use ;; "&" instead. - (cmd-sep (if (and (not w32-shell) (not parallel-in-background)) - ";" - "&")) + (cmd-sep (if (and (or (not w32-shell) file-remote) + (not parallel-in-background)) + ";" "&")) (stuff-it (if (dired--star-or-qmark-p command nil 'keep) (lambda (x) -- cgit v1.2.1