From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Shuguang Sun Newsgroups: gmane.emacs.bugs Subject: bug#29149: Tramp shell uses local shell setting in windows Date: Thu, 25 Jan 2018 20:01:59 +0800 Message-ID: References: <0MfmZs-1eYOTH1z1g-00N7E0@mail.gmx.com> <87bmi6rfao.fsf@gmx.de> <878td14q3u.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c063bc41200660563988cfd" X-Trace: blaine.gmane.org 1516881688 18208 195.159.176.226 (25 Jan 2018 12:01:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 25 Jan 2018 12:01:28 +0000 (UTC) Cc: 29149@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 25 13:01:23 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eegDR-0003oo-Ih for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Jan 2018 13:01:13 +0100 Original-Received: from localhost ([::1]:35949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eegFS-000280-1m for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Jan 2018 07:03:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eegFH-00027O-RU for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2018 07:03:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eegFC-0006iM-11 for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2018 07:03:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33903) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eegFB-0006iE-TL for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2018 07:03:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eegFB-0003qG-L2 for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2018 07:03:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Shuguang Sun Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jan 2018 12:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29149 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29149-submit@debbugs.gnu.org id=B29149.151688172814708 (code B ref 29149); Thu, 25 Jan 2018 12:03:01 +0000 Original-Received: (at 29149) by debbugs.gnu.org; 25 Jan 2018 12:02:08 +0000 Original-Received: from localhost ([127.0.0.1]:41800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eegEK-0003p9-1F for submit@debbugs.gnu.org; Thu, 25 Jan 2018 07:02:08 -0500 Original-Received: from mail-qt0-f179.google.com ([209.85.216.179]:45961) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eegEH-0003of-Dj for 29149@debbugs.gnu.org; Thu, 25 Jan 2018 07:02:06 -0500 Original-Received: by mail-qt0-f179.google.com with SMTP id x27so18475719qtm.12 for <29149@debbugs.gnu.org>; Thu, 25 Jan 2018 04:02:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XbV8DP2/WprJ+IKTYimC8RZBH/DUDPl3XB08gU9F7wA=; b=YydLjXxPdhadqg1PAqMEHW8iFcoFY4L/dwB8cOd25Ma5cTmxuknPHx8UrR2zKekxdx ovBYTzdgogH0MH1OzFd6Lmq4ALiTn8cJSk1PicCTR+U/xUY8ZfrMQ2ElJhTVavSdgPMo SIiMVReIW7SH45e4IqG5gQ618ASlCNSMwtrVsN70gvOHSVjClbztO6XejrhMl+Xy/gAi d/aNmCo3JOU5h39hcdOLKQ3qfN9k0VHeJ7jWBuMtFG39VgAZn+Dxk35+IGtSlHFsVpMQ xMSK1wEs068aRVJMb0qDfcjWiSoKsmE0ZuCtm+jc9Os3wxijPIU4WSL7AjerWT2Uleq3 QAXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XbV8DP2/WprJ+IKTYimC8RZBH/DUDPl3XB08gU9F7wA=; b=jE337RnE7G0Jm7I7fZRqMAXaTSLgP9RkMdLU1Bc9Ae6vEDcpOAWwTQhVOE2uPOmjPr OIs/8QKDuSosBC//Pjufg5pXOSgzlcsu8MXTCNPB0+00o+F6dKM/kjatAhQGC/QfiC7P myzeE2Fb5uqYxERSy/Yl8AGOiZ9+bzy9+N/vFOEML0JztFpt20vmSVyBIZOno1GRTkoy I4RZSnSq59uUp7ERitUSMNJqQ+c7abPnKE86/PC22j2ZNSej8gLYcyQ+DLc7PiwtIWI5 JAgmZkwQNoL7bYJDKdYUG9tWbeylYomJ9xI3vCgFEBbS/gqLNE/onOavEE2B/kDJ19D1 Vu4A== X-Gm-Message-State: AKwxytczn4fkRsohKqwr3TULluP9NnrSY3ewpLR+Enq/14ijPkNYCXk+ A6pV7SYn44H+virh2CnfHi54cnxjmBheX/ein6o= X-Google-Smtp-Source: AH8x224mUSBl6cg3JjsakkM1CCPdW7ATr4keQA2WH26fLrTlqcry1TSS+/BX0gk13rwwfztUghUvnhltnSx2fHM9QF4= X-Received: by 10.55.122.194 with SMTP id v185mr13633205qkc.41.1516881719720; Thu, 25 Jan 2018 04:01:59 -0800 (PST) Original-Received: by 10.237.58.227 with HTTP; Thu, 25 Jan 2018 04:01:59 -0800 (PST) In-Reply-To: <878td14q3u.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:142503 Archived-At: --94eb2c063bc41200660563988cfd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Micahel, Now it works! On Sun, Jan 14, 2018 at 1:37 AM, Michael Albinus wrote: > Shuguang Sun 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 =E2=80=98shell-command=E2=80=99 on a remote host or ot= her 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. > --94eb2c063bc41200660563988cfd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks Micahel,

Now it works= !



On Sun, Jan 14, 2018 at 1:37 AM, Michael Albinus <michael.albinus@gmx.de> wrote:
Shuguang Sun <shuguang@gmail.com> writes:

> Hi Michael,

Hi Shuguang,

> Here I focus on the connection from Wind= ows 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 meas= n there is explicit-shell-file-name, it will not prompt the directory.
=

For example as in the manual:
=C2=A0 (c= onnection-local-set-profile-variables
=C2=A0=C2=A0 'remote-bash
= =C2=A0=C2=A0 '((explicit-shell-file-name . "/bin/bash")
= =C2=A0=C2=A0=C2=A0=C2=A0 (explicit-bash-args . ("-i"))
=C2=A0= =C2=A0=C2=A0=C2=A0 ))

=C2=A0
> 2. 6.5.3 Running =E2=80=98shell-command=E2=80=99 on a remote host or o= ther 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. Ho= wever 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 underst= and
> 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.

--94eb2c063bc41200660563988cfd--