GNU bug report logs - #29149
Tramp shell uses local shell setting in windows

Previous Next

Package: emacs;

Reported by: Shuguang Sun <shuguang <at> gmail.com>

Date: Sun, 5 Nov 2017 04:11:01 UTC

Severity: normal

Merged with 29442

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#29442: closed (dired-do-shell-command puts "start /b" in
 tramp dired)
Date: Thu, 25 Jan 2018 12:31:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 25 Jan 2018 13:30:34 +0100
with message-id <87lggm5ded.fsf <at> gmx.de>
and subject line Re: bug#29149: Tramp shell uses local shell setting in windows
has caused the debbugs.gnu.org bug report #29149,
regarding dired-do-shell-command puts "start /b" in tramp dired
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
29149: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29149
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Shuguang Sun <shuguang <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: dired-do-shell-command puts "start /b" in tramp dired
Date: Sun, 26 Nov 2017 02:09:37 +0800
[Message part 3 (text/plain, inline)]
Hi,

local: Windows7, and shell comman is cmdproxy.exe/cmd
GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2017-11-24

In general dired buffer, if I call dired-do-shell-command on marked file
with end "&", it will call "start /b ..." to run asyn shell command.
However, it hould not happend for tramp dired buffer if the
tramp-remote-shell is not cmd.

For example, my server is linux and tramp-remote-shell is "/bin/sh". If I
run dired-do-shell-command with end "&", it suppose to send the command
directly, but it add "start /b" actually.

I attached the tramp debug for your reference.


Tramp setting:
  (push '("plink"
           (tramp-login-program        "plink")
           (tramp-login-args           (("-l" "%u") ("-P" "%p") ("-ssh")
("%h")))
           (tramp-remote-shell         "/bin/sh")
           (tramp-remote-shell-args    ("-c"))
           (tramp-copy-program         "pscp")
           (tramp-copy-args            (("-l" "%u") ("-P" "%p") ("-scp")
("-p" "%k") ("-q") ("-r")))
           (tramp-copy-keep-date t)
           (tramp-copy-recursive t)
           (tramp-default-port         22))
        tramp-methods)



Best Regards,
Shuguang Sun
[Message part 4 (text/html, inline)]
[tramp_dired_do_shell_command_debug.txt (text/plain, attachment)]
[Message part 6 (message/rfc822, inline)]
From: Michael Albinus <michael.albinus <at> gmx.de>
To: Shuguang Sun <shuguang <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149-done <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Thu, 25 Jan 2018 13:30:34 +0100
Shuguang Sun <shuguang <at> gmail.com> writes:

> Thanks Micahel,

Hi Shuguang,

> Now it works!

Thanks for testing. So I mark this bug as closed.

>     > 1.2 the default directory for read-file-name is better to use
>     > (file-remote-p default-directory) "/" than default-directory
>     > "/path/path/..."
>
>     I don't see why. Could you pls explain?
>
> If we well set the shell via connection-local-set-profile-variables
> which measn there is explicit-shell-file-name, it will not prompt the
> directory. 
>
> For example as in the manual:
>   (connection-local-set-profile-variables
>    'remote-bash
>    '((explicit-shell-file-name . "/bin/bash")
>      (explicit-bash-args . ("-i"))
>      ))

Hmm. I still don't understand why you want to change
default-directory. Or do you want to say it doesn't matter, when
explicit-shell-file-name is set?

And even in case there is no explicit-shell-file-name set,
read-file-name shall work as expected with the existing default-directory.

Best regards, Michael.


This bug report was last modified 7 years and 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.