From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Shuguang Sun Newsgroups: gmane.emacs.help Subject: Re: tramp and shell, problem on windows 7 Date: Sun, 5 Nov 2017 11:08:28 +0800 Message-ID: References: <87lgjmgny3.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1509851346 13873 195.159.176.226 (5 Nov 2017 03:09:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 5 Nov 2017 03:09:06 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Michael Albinus Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 05 04:09:00 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 1eBBIv-0002um-I9 for geh-help-gnu-emacs@m.gmane.org; Sun, 05 Nov 2017 04:08:57 +0100 Original-Received: from localhost ([::1]:42826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBBJ2-0007Qo-N9 for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Nov 2017 23:09:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBBIX-0007Ot-62 for help-gnu-emacs@gnu.org; Sat, 04 Nov 2017 23:08:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBBIU-0000Sp-Jn for help-gnu-emacs@gnu.org; Sat, 04 Nov 2017 23:08:33 -0400 Original-Received: from mail-qt0-x236.google.com ([2607:f8b0:400d:c0d::236]:45849) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eBBIU-0000SK-Dh for help-gnu-emacs@gnu.org; Sat, 04 Nov 2017 23:08:30 -0400 Original-Received: by mail-qt0-x236.google.com with SMTP id p1so7427669qtg.2 for ; Sat, 04 Nov 2017 20:08:29 -0700 (PDT) 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=9IknrNcPgaxQZ9+JnPFruahFEJOK6jwC8e0GMT6n/eM=; b=c1+1pJ/06Dm/Fqlnhum5qO1aju619A7lUhyguk99rxg6nd7rgykE9ofbVfvh3TKOt6 1LPATo90ED79st2HgV/wuqpQK2hSaxMeUx1EbI6g0rZ+ssiHlUxRPX2H6uz0uBFGTqCt 5+vKNHrMeY6wKGu6yqfLLt6tKSRUVORRa6CAS2qC5CAd8TAgFwGC73cKkdMnlPnlCCyi 1b/KJDePfmXJwxgJkNxBH/P01N6FASS7X1SeyCKLRRsOIlEnqpko911aknDWsoJC32fB x8pE3FL0jj3z8JfVTyb6n5ZV254XX1rTPzJxjddfZBT0w2fVyDE5WBf7A9J9AoOskkEu 4WzA== 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=9IknrNcPgaxQZ9+JnPFruahFEJOK6jwC8e0GMT6n/eM=; b=OTSQ7dJTInBvTfNTMUDNjCLWCY12EgbLapNEFeefUOYfFxANi1XMm0k+t3mG24NiWW GSPuAIAaMmzly2b7u5WWOz/L/YeIk1QlPKUxXfS3NPP1Cs4aWGSF5rYCK/OI2q7QsoDb /DBKlPdf5O0/KZsm3aQbKLLOFgqpPjQZhf0NaveVgY68nS+JGZ6LhqWaYvcxVD2+qRUF NCdfNFJkyvQsrSAxXnVS/6A5KuazdnDKG02M795O0S1Dep3cR1NNpGhV37ufFLi0qRgh G/oxZOUbwSEhSMPaIEbHkawoxR/hrCELzzKAr8QHif4Aruj1ugGJxG4qjbYXH/gfDL+S 7vKA== X-Gm-Message-State: AMCzsaWpkkY5usbiWb6/LPjs6Xd5nqZ9Apqjb11aOzf4vDRlB3YzxZwJ aqYCzsP6qQr0i/kx9uwzhMHaw4c/L8Sw/+fbYMM= X-Google-Smtp-Source: ABhQp+TgAlphdqqB2RGoCx2jDZWty2UPzMCFx5qbEkLuqmKsvLoB9Y0PkagsXH8xO88vnffFxXkeUfdKtcty+oTTKd4= X-Received: by 10.200.45.178 with SMTP id p47mr16473741qta.263.1509851309370; Sat, 04 Nov 2017 20:08:29 -0700 (PDT) Original-Received: by 10.237.52.37 with HTTP; Sat, 4 Nov 2017 20:08:28 -0700 (PDT) In-Reply-To: <87lgjmgny3.fsf@gmx.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::236 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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:114749 Archived-At: It works for command shell, but not for dired-do-shell-command, to set explicit-shell-file-name to "/bin/sh". It confirms the explicit-shell-file-name and shell-name are used in tramp dired. On Sat, Nov 4, 2017 at 9:42 PM, Michael Albinus wrote: > 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. >