GNU bug report logs - #34834
26.1; Remote `eshell/mv' and `eshell/cp' on Windows: Opening output file: Invalid argument, c:/home/ ...

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Jordan Wilson <jordan.t.wilson@HIDDEN>; Keywords: confirmed; dated Tue, 12 Mar 2019 21:59:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) confirmed. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 34834 <at> debbugs.gnu.org:


Received: (at 34834) by debbugs.gnu.org; 29 Mar 2019 17:46:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 29 13:46:28 2019
Received: from localhost ([127.0.0.1]:36023 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h9vaG-0006on-Ge
	for submit <at> debbugs.gnu.org; Fri, 29 Mar 2019 13:46:28 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60824)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1h9vaE-0006oW-2Y
 for 34834 <at> debbugs.gnu.org; Fri, 29 Mar 2019 13:46:26 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47825)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1h9va1-0001CT-C0; Fri, 29 Mar 2019 13:46:14 -0400
Received: from [176.228.60.248] (port=1302 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1h9vZw-0000OD-40; Fri, 29 Mar 2019 13:46:12 -0400
Date: Fri, 29 Mar 2019 20:46:10 +0300
Message-Id: <831s2pk1zx.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Albinus <michael.albinus@HIDDEN>
In-reply-to: <87ftr5r7n0.fsf@HIDDEN> (message from Michael Albinus on Fri, 29
 Mar 2019 17:02:27 +0100)
Subject: Re: bug#34834: 26.1;
 Remote `eshell/mv' and `eshell/cp' on Windows: Opening output file:
 Invalid argument, c:/home/ ...
References: <87o96f4v47.fsf@HIDDEN> <871s2qsxli.fsf@HIDDEN>
 <83lg0ykhsj.fsf@HIDDEN> <87wokiriea.fsf@HIDDEN>
 <83h8bmkdbf.fsf@HIDDEN> <87sgv6q6bi.fsf@HIDDEN>
 <834l7lkga1.fsf@HIDDEN> <87k1ghreyb.fsf@HIDDEN>
 <8336n5kbvi.fsf@HIDDEN> <87ftr5r7n0.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34834
Cc: jordan.t.wilson@HIDDEN, 34834 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Michael Albinus <michael.albinus@HIDDEN>
> Cc: jordan.t.wilson@HIDDEN,  34834 <at> debbugs.gnu.org
> Date: Fri, 29 Mar 2019 17:02:27 +0100
> 
> While you are at this, do you have a chance to check bug#26911? It is
> another problem, but also somewhere in Fexpand_file_name.

Will do.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34834; Package emacs. Full text available.

Message received at 34834 <at> debbugs.gnu.org:


Received: (at 34834) by debbugs.gnu.org; 29 Mar 2019 16:02:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 29 12:02:41 2019
Received: from localhost ([127.0.0.1]:35992 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h9txp-0004QQ-Cd
	for submit <at> debbugs.gnu.org; Fri, 29 Mar 2019 12:02:41 -0400
Received: from mout.gmx.net ([212.227.15.18]:48377)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1h9txk-0004Q7-Lt
 for 34834 <at> debbugs.gnu.org; Fri, 29 Mar 2019 12:02:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1553875349;
 bh=X9wxfepcOkjp8uecXbNw7VBh81IKwfyF/cMhhNmH2nw=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=DFSLLQINNRM3L+AKtQ94bhE0v7QAsmYmVaCdSeKr5PyGCHZ++iXw5BunLDYkYBWtM
 WD6njDSQL3GRh27xqImTz8/kFfVQ4VnUXECAXunE/WfZNvEGFSiTpwPlJonXoeQkwY
 h842qW6qaWVlIn5ARt1uTSIWkttCmi4mdrrLc6Ks=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from detlef.gmx.de ([212.86.37.206]) by mail.gmx.com (mrgmx003
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MbPLI-1hQKun30tA-00IhSI; Fri, 29
 Mar 2019 17:02:29 +0100
From: Michael Albinus <michael.albinus@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#34834: 26.1;
 Remote `eshell/mv' and `eshell/cp' on Windows: Opening output file:
 Invalid argument, c:/home/ ...
References: <87o96f4v47.fsf@HIDDEN> <871s2qsxli.fsf@HIDDEN>
 <83lg0ykhsj.fsf@HIDDEN> <87wokiriea.fsf@HIDDEN>
 <83h8bmkdbf.fsf@HIDDEN> <87sgv6q6bi.fsf@HIDDEN>
 <834l7lkga1.fsf@HIDDEN> <87k1ghreyb.fsf@HIDDEN>
 <8336n5kbvi.fsf@HIDDEN>
Date: Fri, 29 Mar 2019 17:02:27 +0100
In-Reply-To: <8336n5kbvi.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 29 Mar
 2019 17:12:49 +0300")
Message-ID: <87ftr5r7n0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:bdXc5gTjBBdHGwohoaRcLMxOXq3gYMDgWcJifmdL4TweWXXLbr5
 q3PU7+DTwOOoKwDQN1YPkZjGjTyMa+RvbysrMLG1ecugBhgfnaMz/4Xp0cv7ReZpmetRFsK
 ERPoFSn5fFAokM2N1h16PgCJ0nSrxo5ICyngAg3XUOPeASTcYW5gZZNdAj0GxDiphLwU9a7
 B4yu03TGzA6AC5LIQvL/A==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:lnzrrzFZ8bI=:zNDUUeEqCf2JKcyhIRR9jw
 fn9EuDftxPNjpQL+mvfsOqGH0PvgG9q+FU7oTxJ/2KedejnaV5GXEgXt88jk3YccxZxmmGYie
 AQWPU1epQNJRDIAejG8nTD0XIjozwrskgZXyTiSr1rQ+ov18B9KBzWFImZLSHWL4bsrsgX/tW
 gAa0e9HetAqvIOFVzkw/TPBq02AYoN9s1NiI2kaxtmnzuDjsvhbj0Ot5LixPqCaxNrZsNYbr6
 8y+VKozK1QfZdeE1uYJ0YjkyrMjUNZEAKEOCusKzNAzcEn9SM/sCOxK9r5ZGA5GX/U1BRjg/2
 3n8Y1QtbI4K8l+aeMsMKN2B0bKZSHEjGvtcuS/wEcwaXpKRpIuAic6Qlg47ckr3ehSJLtipxk
 hcCyxtTejWQE8ose0aVXRkG6ytwaUSFKfy1hW38A9YbaLdbS7rMp6OpE1wfuiWTg7U3o9E2mB
 tKNzu6SMmQjZtENNUv5e8E8hrhbT66In3RwEjlt5feojrBkrpOioQw7ZyrWUTsS8ZHNd5Gwfb
 uXRm/rekOJ6UGWxa6qQI7whfUBbfA4yhWOvuPQzQBECWIWAB8wp0FtEQU1Q+tsdNegjUO70tD
 nR/lLhc21lDzDMv2qrJT2KNNb3zVv/+T8qIP7Hf5Nkd7ygCj4uLEadO2cqMYNY86kLF9+Dcgu
 bGj8mWkvj0W4vjO6BtRWyYbuSEK7vaZOGn0zcPkh9ukkgzKPx9Oth3B6FTbwUacCXLxyLqfdc
 1YHbhuk0wvbnnYGpf1yyN0YyZw9l0QjVnLQmthnXlzseOkxPe9kzRFcTCgCMhCZpTNqwHqqdm
 Em3HPeiHX3g402/pugCMg/EnfJPu5as3iHJXvHPT1o/VIgPdeEidcITdnijG4VtGNmbnM/U23
 BGgsKU1T7PB6RpYGa6WD43jbMI+SnUsg46ZyLL+C44/XjkUOQluswVkE2hEIsHo+yR+SGGiS6
 kukiuB49+lQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 34834
Cc: jordan.t.wilson@HIDDEN, 34834 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

Hi Eli,

> OK, thanks for confirming my conclusions.  I will look into fixing
> this, but it was important for me to know that the root cause isn't
> specific to Windows.

While you are at this, do you have a chance to check bug#26911? It is
another problem, but also somewhere in Fexpand_file_name.

Best regards, Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34834; Package emacs. Full text available.

Message received at 34834 <at> debbugs.gnu.org:


Received: (at 34834) by debbugs.gnu.org; 29 Mar 2019 14:13:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 29 10:13:13 2019
Received: from localhost ([127.0.0.1]:35913 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h9sFt-0001i6-4Z
	for submit <at> debbugs.gnu.org; Fri, 29 Mar 2019 10:13:13 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43374)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1h9sFr-0001hi-7n
 for 34834 <at> debbugs.gnu.org; Fri, 29 Mar 2019 10:13:11 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:42683)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1h9sFk-00006C-Jt; Fri, 29 Mar 2019 10:13:05 -0400
Received: from [176.228.60.248] (port=3931 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1h9sFh-0002lx-DG; Fri, 29 Mar 2019 10:13:03 -0400
Date: Fri, 29 Mar 2019 17:12:49 +0300
Message-Id: <8336n5kbvi.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Albinus <michael.albinus@HIDDEN>
In-reply-to: <87k1ghreyb.fsf@HIDDEN> (message from Michael Albinus on Fri, 29
 Mar 2019 14:24:28 +0100)
Subject: Re: bug#34834: 26.1;
 Remote `eshell/mv' and `eshell/cp' on Windows: Opening output file:
 Invalid argument, c:/home/ ...
References: <87o96f4v47.fsf@HIDDEN> <871s2qsxli.fsf@HIDDEN>
 <83lg0ykhsj.fsf@HIDDEN> <87wokiriea.fsf@HIDDEN>
 <83h8bmkdbf.fsf@HIDDEN> <87sgv6q6bi.fsf@HIDDEN>
 <834l7lkga1.fsf@HIDDEN> <87k1ghreyb.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34834
Cc: jordan.t.wilson@HIDDEN, 34834 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Michael Albinus <michael.albinus@HIDDEN>
> Cc: jordan.t.wilson@HIDDEN,  34834 <at> debbugs.gnu.org
> Date: Fri, 29 Mar 2019 14:24:28 +0100
> 
> > IIUC, it works on Posix platforms by sheer luck, is that right?
> 
> Yes.
> 
> > IOW, on Posix platforms, we also don't recognize this is a remote file
> > name until it's too late, and we only get away because the file name
> > starts with a slash, and so looks like an absolute file name on Posix
> > platforms.  is that correct?
> 
> Yes.

OK, thanks for confirming my conclusions.  I will look into fixing
this, but it was important for me to know that the root cause isn't
specific to Windows.

> I will extend tramp-tests.el to test expand-file-name also with a
> relative DIR argument. At least when running on Windows platforms, this
> shall trigger this error (and prove it is corrected, when it is
> corrected).

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34834; Package emacs. Full text available.

Message received at 34834 <at> debbugs.gnu.org:


Received: (at 34834) by debbugs.gnu.org; 29 Mar 2019 13:24:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 29 09:24:40 2019
Received: from localhost ([127.0.0.1]:35109 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h9rUu-0000Gw-K4
	for submit <at> debbugs.gnu.org; Fri, 29 Mar 2019 09:24:40 -0400
Received: from mout.gmx.net ([212.227.17.21]:37559)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1h9rUs-0000Gh-O0
 for 34834 <at> debbugs.gnu.org; Fri, 29 Mar 2019 09:24:39 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1553865870;
 bh=myhaAijLDKUOBbUKZPoOsH3t7UGwUJe9Prqwgbn7Du4=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=bACGthq2sqeeJ9lNbcKPSYt2KheA40EzNVWM7qcf5qwOHPhav3KIvS9UZJ2Y+dYRi
 EAjYpxKtZ4Jy7M0NowrcH2IhTd7B7n6ABymitQrnCqNfPPOih0o/TjPKh439nKdNgF
 OHXH7xneXV22UrANLCAUXnooAGSUBcUbUtvnIYgU=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from detlef.gmx.de ([212.86.37.206]) by mail.gmx.com (mrgmx101
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MAUpK-1hFwJD49wQ-00Bb2z; Fri, 29
 Mar 2019 14:24:30 +0100
From: Michael Albinus <michael.albinus@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#34834: 26.1;
 Remote `eshell/mv' and `eshell/cp' on Windows: Opening output file:
 Invalid argument, c:/home/ ...
References: <87o96f4v47.fsf@HIDDEN> <871s2qsxli.fsf@HIDDEN>
 <83lg0ykhsj.fsf@HIDDEN> <87wokiriea.fsf@HIDDEN>
 <83h8bmkdbf.fsf@HIDDEN> <87sgv6q6bi.fsf@HIDDEN>
 <834l7lkga1.fsf@HIDDEN>
Date: Fri, 29 Mar 2019 14:24:28 +0100
In-Reply-To: <834l7lkga1.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 29 Mar
 2019 15:37:42 +0300")
Message-ID: <87k1ghreyb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:x1RVMJp3TydrrKdmWU7Lrc0fkhjchjziBsDH4f0Alv9/TbzynNo
 lkiLdRUjvLhKqZlD5lf+xUXGgohlFg3fTQn1otLikn8zDjLBidgOuyZIZUnyV5sACu711dw
 NxEwzJg5OJGq4nfhBqXbs4d0dhdeRAFj+eKSYXAguvh8WKmQbvl2bCocTYyR72ruroc/oPX
 euoHF8EeMBWeVkwsNwR9w==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:yVJbcIZaV5A=:9zOfDCYTqidftvNB9ZUfNr
 64R/RsdobFk0uz9pzMaKb88Xv28N9QnVCH8rzF8pay4kVswaHGx9rORNfvinKu5i81BFmaNsv
 0TYEm8qtxD8bTdVDi67QM7EcqJoleQnCSgwm14iuyagTVqA6/GDYYJPBxI51ZiraqCNzPfr5F
 AuCVqdJ8y4A4gJd0RJBtZvyEVP8C8NMHmr15oaCWgRsJnUkFHV4lcw3NXVZu6Fo3f6TCUnTiQ
 i+MXgHl3k7+ndFEOkDkE8JXm9kpUtrMy8PIEPKMKIPVTKCBv01Qo9H4E08RNf/WZHcsro7+zB
 vUnIrsWygr9HV736esaVFWAy0sHB+3B8+tUjUOQA95ecXSQAqlqcrrpb3PC9scD1C/7oL43SO
 Cxz8it4SmPn/FM7nPZCtIYm3/8qnFSI1xRzs1hLU7ad9Aar7dC7/3cownibNWxIXDanZejRMc
 tEKMzGd7j3bXqql7H16iMqxBJWXHkAM91jF+Itg1z95PKUquRJSY4Grrbco++c3bypV9S0Cgz
 0E9pt5Y5biMPx98kr2/TY6bzg5rflzBoXCaIVDZBszdnC5htylsDjlaWQKhD2f4dz4zg7dme9
 bwZrgCt9YYsf2/VWvlkZsgj8KJEWyMivmO4o7LzawbFsp+ZXFkCXeMCuYtlVVE3M88igQkhQq
 FkYRo7aMVXT2AUdAYg08LJKmIR9hbBVTeoK48dMzKt4lfVbvFxJ2lV7JLOnlouRtcpCY13FzU
 xQfkaWx0Rmej9/FAjRBQDiBJ3b8ru37DnozMxKtdpNEzux3CclbKcJ/8fhNb+KttRI59WYc+p
 n7G9xYUA4FIHXVl0EUycMmXIoajNH2dwbQr+/bvu/0h7aQQvwerlV4jvU8Ylar9/7u9qMZemK
 M/kqUvuJ70JyT5IhFWPJfdMU5ApttNn/dm1AgWegkt6AOfXaQ+V7WE0On9TQjJEFr3TPYnAPE
 5EOutp2Lv9A==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 34834
Cc: jordan.t.wilson@HIDDEN, 34834 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

Hi Eli,

> IIUC, it works on Posix platforms by sheer luck, is that right?

Yes.

> IOW, on Posix platforms, we also don't recognize this is a remote file
> name until it's too late, and we only get away because the file name
> starts with a slash, and so looks like an absolute file name on Posix
> platforms.  is that correct?

Yes.

I will extend tramp-tests.el to test expand-file-name also with a
relative DIR argument. At least when running on Windows platforms, this
shall trigger this error (and prove it is corrected, when it is
corrected).

> And thanks for the detailed description of the traces.

Best regards, Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34834; Package emacs. Full text available.

Message received at 34834 <at> debbugs.gnu.org:


Received: (at 34834) by debbugs.gnu.org; 29 Mar 2019 12:38:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 29 08:38:11 2019
Received: from localhost ([127.0.0.1]:35091 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h9qlv-0007Uc-3M
	for submit <at> debbugs.gnu.org; Fri, 29 Mar 2019 08:38:11 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51584)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1h9qlq-0007U1-Ny
 for 34834 <at> debbugs.gnu.org; Fri, 29 Mar 2019 08:38:07 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40859)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1h9qll-0000TW-8C; Fri, 29 Mar 2019 08:38:01 -0400
Received: from [176.228.60.248] (port=1946 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1h9qle-0002x7-DA; Fri, 29 Mar 2019 08:37:59 -0400
Date: Fri, 29 Mar 2019 15:37:42 +0300
Message-Id: <834l7lkga1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Albinus <michael.albinus@HIDDEN>
In-reply-to: <87sgv6q6bi.fsf@HIDDEN> (message from Michael Albinus on Fri, 29
 Mar 2019 12:16:17 +0100)
Subject: Re: bug#34834: 26.1;
 Remote `eshell/mv' and `eshell/cp' on Windows: Opening output file:
 Invalid argument, c:/home/ ...
References: <87o96f4v47.fsf@HIDDEN> <871s2qsxli.fsf@HIDDEN>
 <83lg0ykhsj.fsf@HIDDEN> <87wokiriea.fsf@HIDDEN>
 <83h8bmkdbf.fsf@HIDDEN> <87sgv6q6bi.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34834
Cc: jordan.t.wilson@HIDDEN, 34834 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Michael Albinus <michael.albinus@HIDDEN>
> Cc: jordan.t.wilson@HIDDEN,  34834 <at> debbugs.gnu.org
> Date: Fri, 29 Mar 2019 12:16:17 +0100
> 
> > Meanwhile, the same problem happens in Emacs 26, so this is not new.
> 
> Yes. It is not so common to use a relative dir argument for
> expand-file-name, and in the non-Windows case it works properly.

IIUC, it works on Posix platforms by sheer luck, is that right?  IOW,
on Posix platforms, we also don't recognize this is a remote file name
until it's too late, and we only get away because the file name starts
with a slash, and so looks like an absolute file name on Posix
platforms.  is that correct?

And thanks for the detailed description of the traces.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34834; Package emacs. Full text available.

Message received at 34834 <at> debbugs.gnu.org:


Received: (at 34834) by debbugs.gnu.org; 29 Mar 2019 11:16:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 29 07:16:31 2019
Received: from localhost ([127.0.0.1]:35076 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h9pUs-0003Hp-3J
	for submit <at> debbugs.gnu.org; Fri, 29 Mar 2019 07:16:30 -0400
Received: from mout.gmx.net ([212.227.17.20]:38013)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1h9pUp-0003Hb-Uu
 for 34834 <at> debbugs.gnu.org; Fri, 29 Mar 2019 07:16:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1553858180;
 bh=RjRAqRJxG64X3C7PwEq5Ilt0k2tXLZ3Dx+emMmSUJfc=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=OksoJ9efGvKU1dcWN/BIc/vfpfMCDR4XF9bVINdlTsjdEiElAawXbyGQoHFYyFywJ
 LW/ltt7prtE1UzIB6DKeocauQujoWxn4VynqbYkdB1WWNKQuHEf3IvjrzriiWgYmXw
 u2gNhD6pHsf2OEdAUI0M081RBL+tNlJNU8rYdv3k=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from detlef.gmx.de ([212.86.37.206]) by mail.gmx.com (mrgmx103
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LmrZY-1gSlRo0JcS-00h9Ea; Fri, 29
 Mar 2019 12:16:20 +0100
From: Michael Albinus <michael.albinus@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#34834: 26.1;
 Remote `eshell/mv' and `eshell/cp' on Windows: Opening output file:
 Invalid argument, c:/home/ ...
References: <87o96f4v47.fsf@HIDDEN> <871s2qsxli.fsf@HIDDEN>
 <83lg0ykhsj.fsf@HIDDEN> <87wokiriea.fsf@HIDDEN>
 <83h8bmkdbf.fsf@HIDDEN>
Date: Fri, 29 Mar 2019 12:16:17 +0100
In-Reply-To: <83h8bmkdbf.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 28 Mar
 2019 21:29:24 +0200")
Message-ID: <87sgv6q6bi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:SFSyecU0bu9CSiLrJaY6a2J8Wumo/c/G1Z3BkaQYX5nhB28+bSj
 p1aUKv6z5cquI7hlqY0TvVIOEmgQuI1vEmzS6B7K0xLtD4WjUtyZodJzHAgGTQ1/1foG0Us
 7pYc9hDGRLoRKThaN/wU4980aW6y3aWox9lu0k06Uu9/4j/tnwKFOaTe5xDcxLQXOYQEH8V
 EgJ64t9Nf7Yub18oo/Dzg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:Ik7EU2xKTNc=:ftMR62plhrUFlxNmleKKJG
 Ko2KRmreIty281fp8zGdRU3DFPtO5K+PritR4u9kj9cGs+LjSI4k3HMf1fqJmumgW6Nc+2Qmx
 6CCWdC1XZQD6JBgsoJVCH2auZeqlTBEh+IH48ges6xHNwE9EoSdZ7UzYePhfhes05GLP/l7Tq
 DbN3I2ZEvPQAY8AlwQ4hBGsUYt2C+r50ch1vI6liqWbqvVksZifO0KdIxR8ZxBQkpyWV0/a5f
 /RFtrcDFAKtk0ef6SOpqFmfSkcE3VpAAm1QLdYCkF9j9U79eq9KYF+fTxvolmqoWnSf8PSYB4
 5xt75/YmfoNYP7ekxWBKVx6LeCmb4ED4oOOPzqJhZAxjybu+EAQe0mBD31HuqnEWcHmiFRg1H
 yWYDIAMNWp1fSsAgWnemb8SRi7QHD98XACxd9YZxD04UirKSua6knklP9AfC4sCOlWdLcWZMs
 cDAk07ZItrGkBp4RyttYj7AZERvOFS31XLoerOlMEPrW8BIPc1Uq+Fr30T9urZIrvrKMcAm5d
 gB/dIDSyfysc7kDx0/xvKFYvYCswRrp44wYVwMDsZ04/bxRDATvd31f3Dp99eVtCZP9B0ecot
 ANjYT8vCjKZZglB58HfJ/JLmEELsqrMi9GYa0VLNB4a311qIyeC6+3Y6+JgUPxNnWJWgmRuKN
 EG0MUX/rNmB+raz62hj0gJx7fBiD3rlJVCTkoKzIOhvTfYclXfB2J1rP9sGGgKzG1mVJTmuf0
 +Byp3N3EeWdnRWOoZjc5gZA4+G7JFeNEzZ1x10WQmnDJrp4H66/JdjdX+hjNJbe9Uv2jt4ZkN
 UU+mMW5yEOnHjLak36OvI02fdVIDY88rtAbpALJPby/kVEmPAkGRyR4NWbE+Dok9eds7C4i10
 zmZ/dt6+gW3t+rcrgQeuIkM5j3vR0tFeVi9DqhXv1xwYlHIWAeWPbRW8RshEXiuaMgpe4CsSQ
 RwR1vow0kRw==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 34834
Cc: jordan.t.wilson@HIDDEN, 34834 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

Hi Eli,

>> Remote file names shouldn't get a drive letter. But this happened:
>
> Can you describe how this is supposed to work?  AFAIR, Tramp's
> file-name handler gets called, and then turns around and calls back
> into expand-file-name after inhibiting file-name handlers?  Or
> something like that.

I have an idea what happened. See the traces I gave in my first answer:

======================================================================
1 -> (expand-file-name "123" "tmp/")
| 2 -> (tramp-file-name-handler expand-file-name "tmp/" "/plinkx:detlefx:/home/albinus/")
| | 3 -> (tramp-sh-handle-expand-file-name "tmp/" "/plinkx:detlefx:/home/albinus/")
| | | 4 -> (tramp-file-name-handler file-name-as-directory "/plinkx:detlefx:/home/albinus/")
| | | 4 <- tramp-file-name-handler: "/plinkx:detlefx:/home/albinus/"
| | | 4 -> (expand-file-name "/home/albinus/tmp/")
| | | 4 <- expand-file-name: "c:/home/albinus/tmp/"
| | 3 <- tramp-sh-handle-expand-file-name: "/plinkx:detlefx:/home/albinus/tmp/"
| 2 <- tramp-file-name-handler: "/plinkx:detlefx:/home/albinus/tmp/"
1 <- expand-file-name: "c:/plinkx:detlefx:/home/albinus/tmp/123"
======================================================================

The buffer's default-directory is remote, "/plinkx:detlefx:/home/albinus/".
expand-file-name is called

--8<---------------cut here---------------start------------->8---
(expand-file-name "123" "tmp/")
--8<---------------cut here---------------end--------------->8---

This is entry "1" in the trace output. In function Fexpand_file_name,
line 794 of fileio.c, there is the check

--8<---------------cut here---------------start------------->8---
  handler = Ffind_file_name_handler (name, Qexpand_file_name);
--8<---------------cut here---------------end--------------->8---

This returns Qnil, because name is "123". Then we have in line 823

--8<---------------cut here---------------start------------->8---
  handler = Ffind_file_name_handler (default_directory, Qexpand_file_name);
--8<---------------cut here---------------end--------------->8---

This returns Qnil again, because default_directory is "tmp/". That's all
about checking for a file name handler. Later on, line 872, there is

--8<---------------cut here---------------start------------->8---
	default_directory = Fexpand_file_name (default_directory, Qnil);
--8<---------------cut here---------------end--------------->8---

which belongs to entry "2" of the traces above. It returns the proper
answer "/plinkx:detlefx:/home/albinus/tmp/". But this is too late; it
must happen before the second call of Ffind_file_name_handler.
Fexpand_file_name continues to work, it constructs the final answer
"/plinkx:detlefx:/home/albinus/tmp/123" *plus* the drive letter (I
suppose line 1047),

As you know, I cannot test it myself any fix, because I cannot build
Emacs for Windows.

> Meanwhile, the same problem happens in Emacs 26, so this is not new.

Yes. It is not so common to use a relative dir argument for
expand-file-name, and in the non-Windows case it works properly. So it
was uncovered for years.

Best regards, Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34834; Package emacs. Full text available.

Message received at 34834 <at> debbugs.gnu.org:


Received: (at 34834) by debbugs.gnu.org; 28 Mar 2019 19:29:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 28 15:29:33 2019
Received: from localhost ([127.0.0.1]:34754 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h9aiT-0004fL-1p
	for submit <at> debbugs.gnu.org; Thu, 28 Mar 2019 15:29:33 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43163)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1h9aiR-0004f8-Dl
 for 34834 <at> debbugs.gnu.org; Thu, 28 Mar 2019 15:29:32 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:42853)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1h9aiL-0002qi-U2; Thu, 28 Mar 2019 15:29:26 -0400
Received: from [176.228.60.248] (port=2174 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1h9aiL-0002aa-6B; Thu, 28 Mar 2019 15:29:25 -0400
Date: Thu, 28 Mar 2019 21:29:24 +0200
Message-Id: <83h8bmkdbf.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Albinus <michael.albinus@HIDDEN>
In-reply-to: <87wokiriea.fsf@HIDDEN> (message from Michael Albinus on Thu, 28
 Mar 2019 18:57:49 +0100)
Subject: Re: bug#34834: 26.1;
 Remote `eshell/mv' and `eshell/cp' on Windows: Opening output file:
 Invalid argument, c:/home/ ...
References: <87o96f4v47.fsf@HIDDEN> <871s2qsxli.fsf@HIDDEN>
 <83lg0ykhsj.fsf@HIDDEN> <87wokiriea.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34834
Cc: jordan.t.wilson@HIDDEN, 34834 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Michael Albinus <michael.albinus@HIDDEN>
> Cc: jordan.t.wilson@HIDDEN,  34834 <at> debbugs.gnu.org
> Date: Thu, 28 Mar 2019 18:57:49 +0100
> 
> Remote file names shouldn't get a drive letter. But this happened:

Can you describe how this is supposed to work?  AFAIR, Tramp's
file-name handler gets called, and then turns around and calls back
into expand-file-name after inhibiting file-name handlers?  Or
something like that.  How does Emacs expand remote file names
correctly on Posix platforms?  If that somehow depends on the fact
that remote file names begin with a slash, and thus look like absolute
file names, then that's not enough for Windows.

Also, is this use case somehow special?  If not, how come Tramp works
at all on Windows?

> >> M-: (expand-file-name "123" "tmp/") ;; 123 is a file, tmp is a directory there.
> >>
> >> => "c:/plinkx:detlefx:/home/albinus/tmp/123"
> 
> And the traces I've shown indicate, that it isn't Tramp who adds the
> drive letter. The rest to check are C sources, I'm unable to debug on MS
> Windows.

My problem is not to debug Emacs, my problem is where to debug.
Please help me focus my search for the culprit.

Meanwhile, the same problem happens in Emacs 26, so this is not new.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34834; Package emacs. Full text available.

Message received at 34834 <at> debbugs.gnu.org:


Received: (at 34834) by debbugs.gnu.org; 28 Mar 2019 17:58:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 28 13:58:01 2019
Received: from localhost ([127.0.0.1]:34654 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h9ZHt-0002jJ-Gq
	for submit <at> debbugs.gnu.org; Thu, 28 Mar 2019 13:58:01 -0400
Received: from mout.gmx.net ([212.227.15.18]:56377)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1h9ZHq-0002iy-S2
 for 34834 <at> debbugs.gnu.org; Thu, 28 Mar 2019 13:57:59 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1553795871;
 bh=HbCl45iHkfXGo2C0DrylTkbEkRr5YAjc/XSqg0t3P4g=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=OMyUmCjZFzm8kDOIxfwYA3EvJlOOvvyQYtcfnk0nKLGY+sBCg5/vauDAjIuGRliTM
 y5RgFF/UWCCD0KaXaG62ZIYTMlQF3jYg4YBzw0bGg0eTI39jiaXG0dRj9ubJfk5KdN
 Af0/6FpzaJoXCIHz2SCuKJGhBYe7gBzRbIAvWOEg=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from detlef.gmx.de ([212.86.37.206]) by mail.gmx.com (mrgmx001
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LvV1X-1h1HXo36ah-010bEw; Thu, 28
 Mar 2019 18:57:51 +0100
From: Michael Albinus <michael.albinus@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#34834: 26.1;
 Remote `eshell/mv' and `eshell/cp' on Windows: Opening output file:
 Invalid argument, c:/home/ ...
References: <87o96f4v47.fsf@HIDDEN> <871s2qsxli.fsf@HIDDEN>
 <83lg0ykhsj.fsf@HIDDEN>
Date: Thu, 28 Mar 2019 18:57:49 +0100
In-Reply-To: <83lg0ykhsj.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 28 Mar
 2019 19:52:44 +0200")
Message-ID: <87wokiriea.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:YOjGHaXq0Wqspjjwcg2dAw1N5ZeEQeLMhXepN0zQu+cnqgsqd2+
 2ahzxdCet4/n7+PNw4MXis3BvnMqdd8MY/YgVT21c6K0V4fIXvcfqEKV32k6RhRbWC2cqWq
 7IXihb+hT6O69J0HTIDQ0UC9GRwpb/5SAYQ/Vwc02h/n9XzVc+K9OwkD7MrcEdDxeQlcbAZ
 NWmXjTodk2PJLEQE0A1Dg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:sixPbpgBEdQ=:L3ZHT+751OM77Jo3DYYkK2
 hyiJQPWGfdyx3tUmq0jBS9OVeFllo3PU417D66SnNk8LFQwZviydaHoFt6i792gUUl+UD0xgD
 nTmzDqyMSvrnVxgIx1zyGWPif4WNTa+moLH51ZaFw6LQIrAacz8892HAx2g0D+qNOFmYB5hiA
 pGb1I7g81P5qGlck6qNbcYlf+0AUGCqgAv32YHtc27g5pD7E1Jiv3NbTRU8VtEvtrfSDOBc6F
 P9H3i3kQw1c3evjwtB0wYtxQz8zBLsALZFiDP3oqgeSTpY2P+Sj42Ug2ELuFeKDoo/LeELRWL
 WtGmf/PC+Y+IOVK7jGn8YAPCgpSzAqL5jValXI3Zuffz6zMHw/E/JKN8NbWn8Vb89rqdv5U/A
 rb/pPVlb/cuLKmyjWZXiKCrEs4k90wSCMQw7C62HT+5pKBGKYooXJZBAlPcVSYRJRpZuT4h7i
 jf/lB/w0jkPYcQwZQdbAgrzM48y+pgBtP+ckqExrpJMtUIH2bCfFH9Xsv/9fHyM6+7sNQbxhK
 F2B9CBo6PCN0iy+Z9PJFn10bbT+46LUQbLlQ/ABQG6XRALr6wRyAGLZ18ZWenj7e1oMn3ToHw
 +dux3qSR9+8J8TzFhCnf1jbCY9q/iupw6f838KvTIyMSrqlLcNbT+yQS8V0F4e9vyj3T+Zkpd
 PZmOvAvqPmbpk9a3ueJvZJsIceB8SyWgzwLkBbfkPPgSw6XGCNS7GtfzN3/pcA9EekyYDaWoo
 ZkflJ/xhGU1DRJb7hBhjsYBbH7sO/9Evoaj3ZRumI5+Kv8KkFoSOeiXELn5XyFwLQbcRgHuxt
 GW21CiOdMDxG0O1K2TdHV2JFKVxs2uvM/ICp+FVtuUVTFCTRzD7awfSXxz0ghgzjeTtsCyMqt
 s6MuVqMTxqN4Yrfl6sIIdL8aflVdCiYhyOXFzI4k2d/rG35Yer4z/Ngb6tjthk9kxBgXheJrV
 jIR33+SVK6Q==
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 34834
Cc: jordan.t.wilson@HIDDEN, 34834 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

Hi Eli,

> I don't think I understand what should I check.  In general a file
> name like "/foo/bar" will have a drive letter added to it by
> expand-file-name.  What makes this case special?

Remote file names shouldn't get a drive letter. But this happened:

>> M-: (expand-file-name "123" "tmp/") ;; 123 is a file, tmp is a director=
y there.
>>
>> =3D> "c:/plinkx:detlefx:/home/albinus/tmp/123"

And the traces I've shown indicate, that it isn't Tramp who adds the
drive letter. The rest to check are C sources, I'm unable to debug on MS
Windows.

Best regards, Michael




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34834; Package emacs. Full text available.

Message received at 34834 <at> debbugs.gnu.org:


Received: (at 34834) by debbugs.gnu.org; 28 Mar 2019 17:52:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 28 13:52:54 2019
Received: from localhost ([127.0.0.1]:34645 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h9ZCw-0002b3-1I
	for submit <at> debbugs.gnu.org; Thu, 28 Mar 2019 13:52:54 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52348)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1h9ZCu-0002aq-F5
 for 34834 <at> debbugs.gnu.org; Thu, 28 Mar 2019 13:52:52 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41014)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1h9ZCp-0006Gh-3M; Thu, 28 Mar 2019 13:52:47 -0400
Received: from [176.228.60.248] (port=4113 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1h9ZCo-000816-Bf; Thu, 28 Mar 2019 13:52:46 -0400
Date: Thu, 28 Mar 2019 19:52:44 +0200
Message-Id: <83lg0ykhsj.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Michael Albinus <michael.albinus@HIDDEN>
In-reply-to: <871s2qsxli.fsf@HIDDEN> (message from Michael Albinus on Thu, 28
 Mar 2019 18:44:09 +0100)
Subject: Re: bug#34834: 26.1;
 Remote `eshell/mv' and `eshell/cp' on Windows: Opening output file:
 Invalid argument, c:/home/ ...
References: <87o96f4v47.fsf@HIDDEN> <871s2qsxli.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34834
Cc: jordan.t.wilson@HIDDEN, 34834 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Michael Albinus <michael.albinus@HIDDEN>
> Date: Thu, 28 Mar 2019 18:44:09 +0100
> Cc: 34834 <at> debbugs.gnu.org
> 
> --8<---------------cut here---------------start------------->8---
> C-x C-f /plinkx:detlefx:/home/albinus/ ;; This is a remote GNU/Linux machine.
> 
> M-: (expand-file-name "123" "tmp/") ;; 123 is a file, tmp is a directory there.
> 
> => "c:/plinkx:detlefx:/home/albinus/tmp/123"
> --8<---------------cut here---------------end--------------->8---
> 
> I have added traces to this, with M-x trace-function-background for
> expand-file-name, tramp-sh-handle-expand-file-name, and
> tramp-file-name-handler. The latter function is Tramp's outmost
> function. The traces look like this:
> 
> ======================================================================
> 1 -> (expand-file-name "123" "tmp/")
> | 2 -> (tramp-file-name-handler expand-file-name "tmp/" "/plinkx:detlefx:/home/albinus/")
> | | 3 -> (tramp-sh-handle-expand-file-name "tmp/" "/plinkx:detlefx:/home/albinus/")
> | | | 4 -> (tramp-file-name-handler file-name-as-directory "/plinkx:detlefx:/home/albinus/")
> | | | 4 <- tramp-file-name-handler: "/plinkx:detlefx:/home/albinus/"
> | | | 4 -> (expand-file-name "/home/albinus/tmp/")
> | | | 4 <- expand-file-name: "c:/home/albinus/tmp/"
> | | 3 <- tramp-sh-handle-expand-file-name: "/plinkx:detlefx:/home/albinus/tmp/"
> | 2 <- tramp-file-name-handler: "/plinkx:detlefx:/home/albinus/tmp/"
> 1 <- expand-file-name: "c:/plinkx:detlefx:/home/albinus/tmp/123"
> ======================================================================
> 
> Looks, like Tramp returns the proper value "/plinkx:detlefx:/home/albinus/tmp/",
> and then in its way through expand-file-name the drive letter is
> added. Since this is a C function, I'm not able to debug further.
> 
> Eli, could you pls check this?

I don't think I understand what should I check.  In general a file
name like "/foo/bar" will have a drive letter added to it by
expand-file-name.  What makes this case special?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34834; Package emacs. Full text available.

Message received at 34834 <at> debbugs.gnu.org:


Received: (at 34834) by debbugs.gnu.org; 28 Mar 2019 17:44:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 28 13:44:18 2019
Received: from localhost ([127.0.0.1]:34624 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h9Z4b-0002LS-SA
	for submit <at> debbugs.gnu.org; Thu, 28 Mar 2019 13:44:18 -0400
Received: from mout.gmx.net ([212.227.15.19]:55219)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael.albinus@HIDDEN>) id 1h9Z4a-0002LB-6Z
 for 34834 <at> debbugs.gnu.org; Thu, 28 Mar 2019 13:44:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1553795050;
 bh=9pgHiT0CgE5axe7F3UxkmMS+fdv/xzmalcTwd5nTHLA=;
 h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To;
 b=UU4R1+mve9gePwWUh52xu6bkz5hdyAqJbS6C8CsKmfc81f/iPThutegw9xOsDgIEt
 rU3VmwPNzqYX+wEy2MgQujM9ZW0ue3enokknsbo2lmWdr7b851HhbSeus31U+eDr3q
 cnrncp+QJwdwJIG+E2+t/mzohHvLEDgDoPtT8g78=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from detlef.gmx.de ([212.86.37.206]) by mail.gmx.com (mrgmx001
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M0h9K-1gpQJz3zzi-00unJi; Thu, 28
 Mar 2019 18:44:10 +0100
From: Michael Albinus <michael.albinus@HIDDEN>
To: Jordan Wilson <jordan.t.wilson@HIDDEN>
Subject: Re: bug#34834: 26.1;
 Remote `eshell/mv' and `eshell/cp' on Windows: Opening output file:
 Invalid argument, c:/home/ ...
References: <87o96f4v47.fsf@HIDDEN>
Date: Thu, 28 Mar 2019 18:44:09 +0100
In-Reply-To: <87o96f4v47.fsf@HIDDEN> (Jordan Wilson's message of "Tue, 12 Mar
 2019 21:54:00 +0000")
Message-ID: <871s2qsxli.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:mDBJqI7XwBdLn+iFZNl76dK5pTE0/S2FtV2zQmwzqA6tTA4a6aL
 4fR+nHQP5kGThjWjndPFWTilLkUA062bDRw+xqJvd/1QU8HpRf56S+3GGofT9UEIgvoe/g1
 lv6pqdLOJKb/powcrfkQJJZDM15IcRDERGQIRvKd8BNuHiEtiiQjdRI5ZICEdaV6AB4DiEP
 pgc3pp7kTY82gWcQHqY2Q==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:s6BRTWW7cBY=:jimQ4gn/OOGq+Nic0ml95a
 PPzCMcfBsm+cq74uVQ3p71MOzR5/QOP/NXoiKdqwTt6uqdL7nkm6brsGwQhlfChaqAkaRbpds
 ja2cSw2SMQGquiCQvcFwLh9AcJ9gl8yxvKWsm7caN63Ta+ni4+qly0veMZEDCKOCqzPvmdEk4
 26KiFR0vmVUVYVsuVCNKuhL3ebaeT2KBqv00SWf++7JRfJ1JjuE3hKNxef7KvXfbs3r4zVlc5
 QvQcCZd02ZXE6vee3bNvgOz+wMfuTMk65dST+8HW11++bgGYgyIvKWXf9L4cexRC3hijSE22J
 aY5oXoQP3iAy6ih0ZgCJ+oH7M22ge10cxONd0qNKVzFzDnxZJWhj18dJyiEVu/oPo+XdF0lDj
 D/Sp2skwX9u/ERDQ+cq5wNQRt5VVBaCOixGMIurA+/JN4qOtUadX0XAS+yjv+eCuByh2OttUl
 lDVDqM0LPTgNA7IEfi9DnnD3aJ+Cgx6p8P/08jvKlzCSZzjwcksrIwnOHPNFLAT/PiP5L0hcH
 wlmvpGJkIrRCFJ5pLZjjgLDcWXgeaA32pO3IUkNsan900V/T37qbyfEzDlv1t7j48Qy4Khm9C
 B0KIQLm7RKsAtI23/cGXa4rSQalTadd0ffxf1kURSpgDLzhg+3kYeWKU6Xk5maVYVVSlXOuSN
 zV7l0VpY2k8sBiGDv19dHiWiMnLdO3iiTYWW40WfHd0axqN77wQtY9ex/SOxgwga3/zYFfFwG
 93Ivx+YkPkOKQ+tCo9IAawuaSfQqGuaIkxeC6aaJf9kmNFJQvSW4ZseUtAcJJ479XWilcS/gV
 ZvMNLk7Mtx5UE+TXxS9+t/my8Hd0iTtQkHCBBR95de4/bKu77t14w46PLNzuIDknObrOA/xt7
 klfWDcPhiPjMny11jKQ2se5mluWiQ+QxZxmrRqW2IQWxib2rCK/K2uJU5nNZE+9P2od/P/ooZ
 brgARpv5idw==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 34834
Cc: 34834 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Jordan Wilson <jordan.t.wilson@HIDDEN> writes:

> Hi,

Hi Jordan,

sorry for the late reply; as usual it takes time for me to find an MS
Windows machine for test.

> this bug is similar to my previously reported bug #33791. I'm running
> Emacs 26.1 (with the patched files.el that fixed that bug[1]) on Windows
> 10. I've replicated this with "emacs -Q".
>
> When using eshell connected to a GNU/Linux machine, `eshell/cp' and
> `eshell/mv' (which are called in eshell with the commands "cp" and "mv")
> both return an "Invalid argument" error when the source and destination
> are relative paths on the remote machine.
>
> Recipe:
> - connect to GNU/Linux machine using plink:
>     /plink:jordan@HIDDEN:/home/jordan/
> - cp/mv a file between locations on the remote machine
>     /plink:jordan@HIDDEN:/home/jordan $ cp file.txt directory/
> - returns:
>    Opening output file: Invalid argument, c:/plink:jordan@HIDDEN:/home/jordan/file.txt
>
> I'm guessing it's a problem of not correctly handling the relative TRAMP
> paths, as it works if provided the full paths for the source and
> destination.

I could reproduce the problem with "GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32)
 of 2019-01-17". It has nothing to do with eshell. My recipe:

--8<---------------cut here---------------start------------->8---
C-x C-f /plinkx:detlefx:/home/albinus/ ;; This is a remote GNU/Linux machine.

M-: (expand-file-name "123" "tmp/") ;; 123 is a file, tmp is a directory there.

=> "c:/plinkx:detlefx:/home/albinus/tmp/123"
--8<---------------cut here---------------end--------------->8---

I have added traces to this, with M-x trace-function-background for
expand-file-name, tramp-sh-handle-expand-file-name, and
tramp-file-name-handler. The latter function is Tramp's outmost
function. The traces look like this:

======================================================================
1 -> (expand-file-name "123" "tmp/")
| 2 -> (tramp-file-name-handler expand-file-name "tmp/" "/plinkx:detlefx:/home/albinus/")
| | 3 -> (tramp-sh-handle-expand-file-name "tmp/" "/plinkx:detlefx:/home/albinus/")
| | | 4 -> (tramp-file-name-handler file-name-as-directory "/plinkx:detlefx:/home/albinus/")
| | | 4 <- tramp-file-name-handler: "/plinkx:detlefx:/home/albinus/"
| | | 4 -> (expand-file-name "/home/albinus/tmp/")
| | | 4 <- expand-file-name: "c:/home/albinus/tmp/"
| | 3 <- tramp-sh-handle-expand-file-name: "/plinkx:detlefx:/home/albinus/tmp/"
| 2 <- tramp-file-name-handler: "/plinkx:detlefx:/home/albinus/tmp/"
1 <- expand-file-name: "c:/plinkx:detlefx:/home/albinus/tmp/123"
======================================================================

Looks, like Tramp returns the proper value "/plinkx:detlefx:/home/albinus/tmp/",
and then in its way through expand-file-name the drive letter is
added. Since this is a C function, I'm not able to debug further.

Eli, could you pls check this?

> Thanks.

Best regards, Michael.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34834; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Mar 2019 21:58:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 12 17:58:56 2019
Received: from localhost ([127.0.0.1]:40784 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h3pQF-00066e-R2
	for submit <at> debbugs.gnu.org; Tue, 12 Mar 2019 17:58:56 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53934)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jordan.t.wilson@HIDDEN>) id 1h3pQE-00066R-7D
 for submit <at> debbugs.gnu.org; Tue, 12 Mar 2019 17:58:54 -0400
Received: from lists.gnu.org ([209.51.188.17]:55403)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jordan.t.wilson@HIDDEN>)
 id 1h3pQ8-0005yo-UY
 for submit <at> debbugs.gnu.org; Tue, 12 Mar 2019 17:58:48 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40016)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jordan.t.wilson@HIDDEN>) id 1h3pQ7-0001gq-So
 for bug-gnu-emacs@HIDDEN; Tue, 12 Mar 2019 17:58:48 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 RCVD_IN_DNSWL_LOW,URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jordan.t.wilson@HIDDEN>) id 1h3pLV-0001lz-OF
 for bug-gnu-emacs@HIDDEN; Tue, 12 Mar 2019 17:54:02 -0400
Received: from mout.gmx.net ([212.227.17.22]:35131)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <jordan.t.wilson@HIDDEN>)
 id 1h3pLV-0001km-Dy
 for bug-gnu-emacs@HIDDEN; Tue, 12 Mar 2019 17:54:01 -0400
Received: from A715-WIN ([31.205.36.202]) by mail.gmx.com (mrgmx101
 [212.227.17.174]) with ESMTPSA (Nemesis) id 0Metpl-1hNyl40VFx-00OWzs for
 <bug-gnu-emacs@HIDDEN>; Tue, 12 Mar 2019 22:53:59 +0100
From: Jordan Wilson <jordan.t.wilson@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 26.1;
 Remote `eshell/mv' and `eshell/cp' on Windows: Opening output file:
 Invalid argument, c:/home/ ...
Date: Tue, 12 Mar 2019 21:54:00 +0000
Message-ID: <87o96f4v47.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:1g78KbFENFH1f2KR5KrBcuXz+51RireDihu5cm/YL9h2kYpWIuc
 Eb4dq+pvhf5ZmgGJAwn1unFBGy8Awpgrp0OjntyH7Lu/zI99amKlLJZut0lRlldKy2ZMCda
 ysEopIi+ePAr5g3qORWGCHqvT46ARxUCcOGD80CXHnnjbn2Y9mVk5ubZ5pJqPGpROl1rS76
 Fq5MuBIw+G/tM9dOjnP7g==
X-UI-Out-Filterresults: notjunk:1;V03:K0:rRUNmItpFLo=:9ulzC6fJKPjOZsUKMCEp/W
 HsbBPemeaYTM5CTbrbPE8W7LT6t2i11hVqBM7j08V7iy6yMq0semxd3ETLZkMdHaxQQkqzZgJ
 Q0G7Ub6mknc/oH7POV2gwFrb8mR1OaaQ2qEoz8fk0Yf7QNZGsHilz25y9z5BAGaxGwOOj/3m6
 whXwdz9uQqNJ4pkViWY9j8oWPxxz3IuSpWI20Yb1kJ4MN33pCAvugoXlO2SuOWPSopBK6AZ5s
 I/j+MuRC7eoPYVvDUdBS9BrkK8HKZOCbLT+l/fYieVy3leWQdfIjP8KRTZoA7RgXEn4ENNg1Z
 7lVTIf2824oOENFiyoI9MX1d5fJGmrvBKSmgJbm/Du/1B9xV+C4pAJ1jwVehZzTCDGRosVzVw
 G6ueViJ3pHiwusTTLPL1oRS2htWTSFzq4BO2IBcPG9/fezlRzWq3onG0iAW3w5+n8ghtM/l1L
 g1m+FxJ2Hi+0zGt2tF5XZH59/QKkaXIe+6mCOyRe/Z3CWhs88uqWIWOpMxGCPtxS7NXPVk1gt
 qkVow28LmfvJnd4D3HdM0lXbkXhcsx0sd7MIlvbeAOhgEC5QaCWAIQZKfJGwaIYaVaWlcvegU
 XkkGWBK/CxX50x38tF7fXeF8otqScvKyCQQMUV8iZDkBugqXB0o2lLSHKA8eCdGB0/QFW+nBd
 WzOHG4WBLoQNNRQMO5L+qc4xHHwiB0YXuIvInVN1uXelFvHcGSNwIegAWl7xAwOPpJBNgUElF
 wsx/8Bx9XydD+Psmp/FgdBXoJAp6lp5iNaSFTjQNov+U2DZ5Kt1Pl8e48uneSg5y2eZDjL0m4
 FcU6wVqdGNSi2vQwoKbbTnHnoE3iPCpc1G0QtoyNkJYyOt5a5ninGPfq+0DVzNsnsb+opBsZV
 kvn53UrLPO4JMtZn4WEgb+BEbdPCoor3FhXpYBqnz4vKjuh67UAz0LmHSlcIN0Vd02cPWPfqT
 t6x63YZ1NHw==
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 212.227.17.22
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)


Hi,
this bug is similar to my previously reported bug #33791. I'm running
Emacs 26.1 (with the patched files.el that fixed that bug[1]) on Windows
10. I've replicated this with "emacs -Q".

When using eshell connected to a GNU/Linux machine, `eshell/cp' and
`eshell/mv' (which are called in eshell with the commands "cp" and "mv")
both return an "Invalid argument" error when the source and destination
are relative paths on the remote machine.

Recipe:
- connect to GNU/Linux machine using plink:
    /plink:jordan@HIDDEN:/home/jordan/
- cp/mv a file between locations on the remote machine
    /plink:jordan@HIDDEN:/home/jordan $ cp file.txt directory/
- returns:
   Opening output file: Invalid argument, c:/plink:jordan@HIDDEN:/home/jordan/file.txt

I'm guessing it's a problem of not correctly handling the relative TRAMP
paths, as it works if provided the full paths for the source and
destination.

Thanks.

Footnotes: 
[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33791;msg=34  


In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
 of 2018-05-29 built on TPW550S
Windowing system distributor 'Microsoft Corp.', version 10.0.17134
Recent messages:

Configured using:
 'configure --without-compress-install --without-dbus --with-modules
 'CFLAGS= -O2 -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND NOTIFY ACL GNUTLS LIBXML2
ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS LCMS2

Important settings:
  value of $LANG: ENG
  locale-coding-system: cp1252

-- 
Jordan Wilson
    Sent from Gnus v5.13, GNU Emacs 26.1




Acknowledgement sent to Jordan Wilson <jordan.t.wilson@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#34834; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 2 Apr 2019 01:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.