From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#33791: 26.1; Eshell on Windows connecting to GNU/Linux machine using TRAMP and plink: env: =?UTF-8?Q?=E2=80=98c:/home/jordan/test.sh=E2=80=99:?= No such file or directory Date: Sat, 29 Dec 2018 10:25:37 +0100 Message-ID: <87sgygr8fi.fsf@gmx.de> References: <87pntyanho.fsf@gmx.com> <83zhsxap9i.fsf@gnu.org> <875zvluaby.fsf@gmx.de> <83r2e9alte.fsf@gnu.org> <87woo0s9g1.fsf@gmx.com> <83woo08cb7.fsf@gnu.org> <874lazqekr.fsf@gmx.de> <8336qi6p9r.fsf@gnu.org> <87sgyhtvjc.fsf@gmx.com> <83sgyh5vxv.fsf@gnu.org> <87bm55tpvc.fsf@gmx.com> <83ftug66lf.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1546076761 17796 195.159.176.226 (29 Dec 2018 09:46:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 29 Dec 2018 09:46:01 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Jordan Wilson , 33791@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 29 10:45:56 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 1gdBBs-0004YS-By for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Dec 2018 10:45:56 +0100 Original-Received: from localhost ([127.0.0.1]:35561 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gdBDz-0007eY-Av for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Dec 2018 04:48:07 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gdBDc-00073Y-Nj for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2018 04:48:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gdAsc-0000ru-94 for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2018 04:26:18 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48148) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gdAsc-0000rG-01 for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2018 04:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gdAsb-0007jF-KP for bug-gnu-emacs@gnu.org; Sat, 29 Dec 2018 04:26:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Dec 2018 09:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33791 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33791-submit@debbugs.gnu.org id=B33791.154607554729689 (code B ref 33791); Sat, 29 Dec 2018 09:26:01 +0000 Original-Received: (at 33791) by debbugs.gnu.org; 29 Dec 2018 09:25:47 +0000 Original-Received: from localhost ([127.0.0.1]:40839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdAsN-0007in-2x for submit@debbugs.gnu.org; Sat, 29 Dec 2018 04:25:47 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:60615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdAsL-0007iZ-AG for 33791@debbugs.gnu.org; Sat, 29 Dec 2018 04:25:45 -0500 Original-Received: from detlef.gmx.de ([213.220.156.5]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MTSKd-1gk53N30tj-00SN3J; Sat, 29 Dec 2018 10:25:38 +0100 In-Reply-To: <83ftug66lf.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 29 Dec 2018 11:10:52 +0200") X-Provags-ID: V03:K1:kd7b32nhnHVFjO8qJbDn7Wn0czVXnLvH0uBn2MZe6Z7CWrR97Xr xY7YfaJ63o8inUkcgc9ZITPuGTXqI7n/iGzaFyduaAqHfeEmB5Wj8lwMG8EVGTtunTf01YM q6mk8gnJa4B3iKGkkSsMIWKSKcFD/eW17mEv++eMsPpB09EaZdhbnvzccEK7ePFTFeWo/7b 7m8z4ljEp41qsVkSMhGpg== X-UI-Out-Filterresults: notjunk:1;V03:K0:lrFaOfg5h3k=:7vqZGSHEdLG0caDstbG0Cm fx/omkVCdgLIFZ3CzIEd89+YZobMLbuO+jYCgbDlHxLOi7fuZKv710WQSp95X5BaPyRvLhKJp TpcwU0fXW2VfjFvUh0e/mZF4FZbpIu33dhNvcM8LZsCXpYR45kbJPiR4IdKZt1dqm/FrpW1kj kYcuIs+G3NbfPPBfaMw0QEo3GPZvtPNvObpZJj5TVGq4ktz2aVq57A4LsSen6MAoA3io0e2CP 7sd3UOOmfLVmoGT6Vizd2L7GzyPo45H2Tw3IbWBVSZ26YQHSOBOLDKq1twa+eIKdjT/89ywgh HIirzQ5jNpCOWA87ddr6kkCnmrKznARdQDnhZPJj90d0BzQyiXZYZloeBQpoJOFn/9UpgOq/E XWfg2X692DGklbVQThtJgIlArSL8ktmoaokvO39QejeQ7EyyMen03ewMDYn5+C21j7QvQB6eN PUCyzrUNsZPmdnUVzkSnkAm5YA5tasW5EiiniCUNS7YjZMa46pdLAWe9LC9+pU1q56I9eYlwI ujEsXDXUZ4hrpvgT5x7WApvwscK1cw8dDgzz8UcqtAatY8TRnlzOGOOvEkKv3hcmOrVWsu9ql jnAEl+qnDyFbS85Jya12s9z6dU0XPxXCYF41eBel2AcSkcY7ml0Ii50VFYWhMEYCgHbzwNCwZ FDJC4HYYGG8b2vCRBMmi3MNkxCeVsZNbszN+BxEvY/ay3YPbfddlBk+fwjm5+fB+BLp6HgfHQ WEMW70UPGvjui3JjwmUxnUNQ3GN5KrVJLBNRpPmpCjEI7aJ1v4GT0RNRHnKRyvB4/4PEg0qj 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:153980 Archived-At: Eli Zaretskii writes: Hi Eli, > Michael, I need your help here. The problem is in this part of > eshell-gather-process-output: > > (cond > ((fboundp 'start-file-process) > (setq proc > (let ((process-connection-type > (unless (eshell-needs-pipe-p command) > process-connection-type)) > (command (file-local-name command))) > (apply 'start-file-process > (file-name-nondirectory command) nil > ;; `start-process' can't deal with relative filenames. > (append (list (expand-file-name command)) args)))) > > The problem is that file-local-name returns a Unix-style absolute file > name /foo/bar/baz, and the following expand-file-name call then > prepends a drive letter on Windows, because there's no longer any sign > of COMMAND being a remote file, and so expand-file-name doesn't invoke > the Tramp handler. This is fixed in the master branch already: --8<---------------cut here---------------start------------->8--- (cond ((fboundp 'start-file-process) (setq proc (let ((process-connection-type (unless (eshell-needs-pipe-p command) process-connection-type)) ;; `start-process' can't deal with relative filenames. (command (file-local-name (expand-file-name command)))) (apply 'start-file-process (file-name-nondirectory command) nil command args))) --8<---------------cut here---------------end--------------->8--- The respective commit is --8<---------------cut here---------------start------------->8--- commit bca35315e16cb53415649e5c0ac2ec0cc1368679 Author: Michael Albinus Date: Thu Sep 6 12:16:00 2018 +0200 Fix Bug#31704 * lisp/eshell/esh-proc.el (eshell-gather-process-output): Do not let `expand-file-name' prefix remote file names with MS Windows volume letter. * lisp/net/tramp.el (tramp-eshell-directory-change): Use `path-separator' as it does eshell. (Bug#31704) --8<---------------cut here---------------end--------------->8--- As you see, it requires two changes, in esh-proc.el and tramp.el. > Btw, isn't it confusing that start-file-process needs only the "local" > part of COMMAND? Why cannot its handler DTRT internally instead? What do you do, if COMMAND is another remote location than default-directory? And more general, there could also be file names in the PROGRAM-ARGS part of start-file-process. Who decides, which of them is a remote file name to be stripped to the local part, and which offers remote file name syntax to be used literally? That's why we have decided (long ago), to not allow remote arguments for both start-file-process and process-file. > Thanks. Best regards, Michael.