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


Message #61 received at 29149 <at> debbugs.gnu.org (full text, mbox):

From: Shuguang Sun <shuguang <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 29149 <at> debbugs.gnu.org
Subject: Re: bug#29149: Tramp shell uses local shell setting in windows
Date: Thu, 25 Jan 2018 20:01:59 +0800
[Message part 1 (text/plain, inline)]
Thanks Micahel,

Now it works!



On Sun, Jan 14, 2018 at 1:37 AM, Michael Albinus <michael.albinus <at> gmx.de>
wrote:

> Shuguang Sun <shuguang <at> gmail.com> writes:
>
> > Hi Michael,
>
> Hi Shuguang,
>
> > Here I focus on the connection from Windows local to linux remote
>
> Finally, I was able to test on a Windows machine.
>
> > 1.1 expand-file-name will add c:/ to the shell-file name because the
> > local is windows
>
> Yes. However, your patch (commenting expand-file-name) does not look
> proper. I've committed another patch, changing the order
> expand-file-name and file-local-name are called. This fixes this.
>
> > 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"))
     ))



> > 2. 6.5.3 Running ‘shell-command’ on a remote host or other section
> > can't solve "start /b" issue. It is introduced by
> > dired-do-shell-command (in dired-aux.el). It checks w32-shell for
> > local environment and then add "start /b" to the command. However if
> > it is in a tramp dir (e.g. linux server), the command with "start /b"
> > will be transpose to remote handler. The linux shell can't understand
> > it.
>
> Yes. Your patch is OK, so I've applied it.
>
> Everything committed to the master branch. Could you, pls, check?
>
> Since both patches are simple, they could also be backported to the
> emacs-26 branch. Eli, could you pls advice me whether I shall do?
>
> Best regards, Michael.
>
[Message part 2 (text/html, inline)]

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.