From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: tramp and shell, problem on windows 7 Date: Sat, 04 Nov 2017 14:42:28 +0100 Message-ID: <87lgjmgny3.fsf@gmx.de> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1509802982 9353 195.159.176.226 (4 Nov 2017 13:43:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Nov 2017 13:43:02 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Shuguang Sun Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 04 14:42:58 2017 Return-path: Envelope-to: geh-help-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 1eAyiv-0001vK-7R for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Nov 2017 14:42:57 +0100 Original-Received: from localhost ([::1]:41053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAyj1-0002sB-4c for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Nov 2017 09:43:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eAyiZ-0002s5-Bv for help-gnu-emacs@gnu.org; Sat, 04 Nov 2017 09:42:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eAyiW-0003My-9N for help-gnu-emacs@gnu.org; Sat, 04 Nov 2017 09:42:35 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:58028) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eAyiV-0003Ma-Vy for help-gnu-emacs@gnu.org; Sat, 04 Nov 2017 09:42:32 -0400 Original-Received: from detlef.gmx.de ([212.86.38.88]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MbgWb-1drwGG1QG5-00J5Kd; Sat, 04 Nov 2017 14:42:29 +0100 In-Reply-To: (Shuguang Sun's message of "Sat, 4 Nov 2017 16:42:57 +0800") X-Provags-ID: V03:K0:rckxVG6PG5XBYGFiuiorXLYfSjmhot9vvTGrSKSsLcVWQSi1eLg 5QqqcqYOyzJv9AbNY8ErnHE8lhtg5Rk+tfJRz75YJzZCT2jogyowMJiV+JxxywQagEaWdug 8VbsX53RmSSm2ylifDHXF8Lzw6ERlmz0i7wQDN6Bu9ignkRGX0B8nmQBRT21yQm7qPV0PkX /pI8YmTGYckfY3bl/Nl8w== X-UI-Out-Filterresults: notjunk:1;V01:K0:30KvJh2DyD4=:7dsoKjTtOxz58yLd1r5LbE kcDVmZO6JDXP78A26u0CF0SqbG3OwG9Vkf4gpCy65rKFIuw+lsqtvRsZnYdgZoTdLeD9P6qJV CRuipt5U2ujejUMuuprL5raZ1rSs5XtcBVgfX9JODcYPJQq5TKqQpbwAATGspDmRgOkcl3vtU 6edRknyTSyxHClLoEOl9J2AVtbokBJJOa8qoKuvDuKfDoUVkwI3JJNwQYfLHqVtMUHfGTdDZ9 lnhtZ4x66jsMohVt5EccB/6E15N8yiLvG5oVCxs7r5O0QwFc0NH0Dgi7fGoYxMeYz082tcd5s QzapcKnQ27S5s0k7zt0Z0TiZ+r570nxzltvFDm362h5RSAj2f7bZsexsEFM5LrTvmHCubgCex jKrBmGbCLRwvYWiciwpi3pjoov3YcRVoKjdIVlVxOFNiMJNrvCwhLuwik1oxyt6uXhrwYjsAP VdyAnJTa9Nml2GknfnLN2tQDNxmRJiVu8tups8gxm1BAgV1p4f+9dQAEgFhNv69twyxOlHM3M QK/k57yunjLPdpf+WudpaRs0of/eTMcukuNkeYXqqC6f7GyPGz5b4Q1ezvzRTdQKcTwpPie1W zMcwNcmhZ3nOGw03Jxbrk7N9o09E/utDKtLPl9vUE6UzTh0z2RDylJS1CJf/J/GL6Yd22UkP4 lKGQBK0xBCzQ3Dag4dpsnX1F2IGD7gkJDYRou+wpban+ZfKDoYG5SR2ZVqRb0pgyFy5tV3s81 HOmUpkCRSlSSfniVP8ayvbJzy085ATA9v/lKV+ZelsKA8wYOU5FCFgFJmGHWF83sM6gNexzN X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.15 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114737 Archived-At: Shuguang Sun writes: > Hi all, Hi, > Windows7, > GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2017-10-21 I don't use Windows myself, so I can guess only. > - Problem 1: tramp and dired-do-shell-command: start: Unknown job: /b > Why "start /b" is called remote side? Internally, `shell-command' will be called. This uses `shell-file-name' and `shell-command-switch'. I suppose, both variables are set to "start" and "/b", respectively, in your environment. > When I run tramp (plink) and go to a remote buffer (dired mode), run > dired-do-shell-command (!) on marked file (for example, R CMD BATCH * &). > It popup the buffer of * Async Shell Command *, and the command is not run > but a message "start: Unknown job: /b" which looks it runs the windows-like > command "start /b ..." on the remote shell. You will be served better if you set `explicit-shell-file-name' to a proper value, for example "/bin/sh". See the discussion in the Emacs manual, node "Interactive Subshell". > - Problem 2: tramp and shell: env: c:/bin/ : No such file or directory > where "c:/" comes? > > In a tramp dried buffer, call shell which suppose to raise the shell buffer > on remote server. However, I got error messge in the * shell * buffer that > "env: c:/bin/ : No such file or directory". I don't know where the "c:/" > comes from. When shell is called, it reads the remote path in the minibufer > with promotes > "/plink:user@host:/path/to/dired/C:/Users/username/emacs/libexec/emacs/27.0.50/x86_64-w64-mingw32/cmdproxy.exe", > and I change it to "/plink:user@host:/bin/", and then I got error message > above. Below is the tracking: This I cannot answer (yet). Try the setting above, and let's see what's happening. > Best Regards, > Shuguang Sun Best regards, Michael.