From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Warren Lynn Newsgroups: gmane.emacs.bugs Subject: bug#21562: 24.5; Copy dir via Tramp pscp does not work Date: Fri, 2 Oct 2015 10:35:16 -0400 Message-ID: References: <878u7tk0bm.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=94eb2c030af483b5300521201286 X-Trace: ger.gmane.org 1443802144 13126 80.91.229.3 (2 Oct 2015 16:09:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Oct 2015 16:09:04 +0000 (UTC) Cc: 21562@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 02 18:08:55 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zi2tB-0003Bf-R5 for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Oct 2015 18:08:54 +0200 Original-Received: from localhost ([::1]:32841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi2tB-0004he-Cw for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Oct 2015 12:08:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi1RP-0002ro-QM for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2015 10:36:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zi1RK-0001vb-5D for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2015 10:36:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi1RK-0001vQ-12 for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2015 10:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zi1RJ-0007un-PF for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2015 10:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Warren Lynn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Oct 2015 14:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21562 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 21562-submit@debbugs.gnu.org id=B21562.144379652030377 (code B ref 21562); Fri, 02 Oct 2015 14:36:01 +0000 Original-Received: (at 21562) by debbugs.gnu.org; 2 Oct 2015 14:35:20 +0000 Original-Received: from localhost ([127.0.0.1]:52274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zi1Qd-0007tq-5j for submit@debbugs.gnu.org; Fri, 02 Oct 2015 10:35:19 -0400 Original-Received: from mail-yk0-f178.google.com ([209.85.160.178]:35910) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zi1Qb-0007ti-DP for 21562@debbugs.gnu.org; Fri, 02 Oct 2015 10:35:18 -0400 Original-Received: by ykdt18 with SMTP id t18so112059656ykd.3 for <21562@debbugs.gnu.org>; Fri, 02 Oct 2015 07:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=swXmsUbYbsIJ67Vv20zJmvc1sqdWXso8kxoWf7PW7P4=; b=cEn81F25Vsw5q566EgbYmeiOkSd7W/Qk1kBfYEfXGolwVHvfMsridwXey0PlT9IbTq oaxss9doevFKcgosEJclPlv4uu6sCJ1mL4AJ1Aa4nJfXf+wkLyRNDd7mb7Vih9jDi7Gr j4idW/p8D2V7IjTSNj3cnDI1YTYnXtTlET7IbOBNALlJ/VZFzWj8aGq6ZH0pyVBh5/Wm JD1mK93LKKoqNtzReL9BqJiWsUnG9DMETK6yPrroLYvbnCSQphEVwY+SMK2cR5OiIttx 5v25T/S3ZQvuNrGaGHoD+pDlJfUeV+7bbwAuCtOv4zClFGGeTI4gPa7O0GdLMQcuXl+/ wkHA== X-Received: by 10.13.243.4 with SMTP id c4mr14245344ywf.12.1443796516811; Fri, 02 Oct 2015 07:35:16 -0700 (PDT) Original-Received: by 10.37.36.133 with HTTP; Fri, 2 Oct 2015 07:35:16 -0700 (PDT) In-Reply-To: <878u7tk0bm.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107214 Archived-At: --94eb2c030af483b5300521201286 Content-Type: multipart/alternative; boundary=94eb2c030af483b52a0521201284 --94eb2c030af483b52a0521201284 Content-Type: text/plain; charset=UTF-8 I found the cause and have a fix for it. Attached is the patch (on top of Emacs 24.5.1).: The cause is the order of the function "shell-quote-argument" and "file-name-nondirectory" is wrong. So if I have a target directory name "c:\wlynn\tmp\xyz", the buggy code will first quote it into "\"c:\wlynn\tmp\xyz\"", and the file-name-nondirectory function will strip the last part, ending with something like this: "\"c:\wlynn\tmp" See the dangling leading quote? I verified that it works now. Let me know if you think the patch is good and is merged into the latest dev branch. Thanks. On Sat, Sep 26, 2015 at 5:16 AM, Michael Albinus wrote: > Warren Lynn writes: > > > I use dired/tramp to view a directory on a remote machine (Linux) with > > pscp method, and if I do a copy (recursively) of a remote dir to > > either a local or another remote dir with command dired-to-copy, it > > fails (after entering the password) with the following message in the > > minibuffer: > > > > ============================================ > > Tramp failed to connect. If this happens repeatedly try 'M-x > > tramp-cleanup-this-connection' > > ============================================ > > Please apply (setq tramp-verbose 6) prior to your test. Rerun the test, > and show us the resulting Tramp debug buffer. > > Best regards, Michael. > --94eb2c030af483b52a0521201284 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I found the cause and have a fix for it. Attached is = the patch (on top of Emacs 24.5.1).:

The cause is the order of= the function "shell-quote-argument" and "file-name-nondirec= tory" is wrong. So if I have a target directory name "c:\wlynn\tm= p\xyz", the buggy code will first quote it into
"\"c= :\wlynn\tmp\xyz\"", and the file-name-nondirectory function will = strip the last part, ending with something like this:
"\"c:\wl= ynn\tmp"

See the dangling leading quote?

I verified that it works now. Let me know if you think the patch is = good and is merged into the latest dev branch. Thanks.


On Sat,= Sep 26, 2015 at 5:16 AM, Michael Albinus <michael.albinus@gmx.de= > wrote:
Warren Lynn <wrn.lynn@gmail.com> writes:

> I use dired/tramp to view a directory on a remote machine (Linux) with=
> pscp method, and if I do a copy (recursively) of a remote dir to
> either a local or another remote dir with command dired-to-copy, it > fails (after entering the password) with the following message in the<= br> > minibuffer:
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> Tramp failed to connect. If this happens repeatedly try 'M-x
> tramp-cleanup-this-connection'
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Please apply (setq tramp-verbose 6) prior to your test. Rerun the test,
and show us the resulting Tramp debug buffer.

Best regards, Michael.

--94eb2c030af483b52a0521201284-- --94eb2c030af483b5300521201286 Content-Type: application/octet-stream; name="emacs-bug-21562-fix.patch" Content-Disposition: attachment; filename="emacs-bug-21562-fix.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_if9r0dww0 LS0tIGM6L3dsaW4vYmluL2VtYWNzLTI0LjUvc2hhcmUvZW1hY3MvMjQuNS9saXNwL25ldC90cmFt cC1zaC5lbC5vcmlnCTIwMTUtMDQtMDIgMDM6MjM6MDYuMDAwMDAwMDAwIC0wNDAwDQorKysgYzov d2xpbi9iaW4vZW1hY3MtMjQuNS9zaGFyZS9lbWFjcy8yNC41L2xpc3AvbmV0L3RyYW1wLXNoLmVs CTIwMTUtMTAtMDIgMTA6Mjg6MzMuMzA0MTMwNDAwIC0wNDAwDQpAQCAtMjI5Miw3ICsyMjkyLDgg QEANCiAJKHNldHEgc291cmNlIChpZiB0MQ0KIAkJCSAodHJhbXAtbWFrZS1jb3B5LXByb2dyYW0t ZmlsZS1uYW1lIHYpDQogCQkgICAgICAgKHNoZWxsLXF1b3RlLWFyZ3VtZW50IGZpbGVuYW1lKSkN Ci0JICAgICAgdGFyZ2V0IChmdW5jYWxsDQorICAgICAgICAgIHRhcmdldCAoc2hlbGwtcXVvdGUt YXJndW1lbnQNCisgICAgICAgICAgICAgICAgICAoZnVuY2FsbA0KIAkJICAgICAgKGlmIChhbmQg KGZpbGUtZGlyZWN0b3J5LXAgZmlsZW5hbWUpDQogCQkJICAgICAgIChzdHJpbmctZXF1YWwNCiAJ CQkJKGZpbGUtbmFtZS1ub25kaXJlY3RvcnkgZmlsZW5hbWUpDQpAQCAtMjMwMSw3ICsyMzAyLDcg QEANCiAJCQknaWRlbnRpdHkpDQogCQkgICAgICAoaWYgdDINCiAJCQkgICh0cmFtcC1tYWtlLWNv cHktcHJvZ3JhbS1maWxlLW5hbWUgdikNCi0JCQkoc2hlbGwtcXVvdGUtYXJndW1lbnQgbmV3bmFt ZSkpKSkNCisgICAgICAgICAgICAgIG5ld25hbWUpKSkpDQogDQogCTs7IENoZWNrIGZvciBob3N0 IGFuZCBwb3J0IG51bWJlci4gIFdlIGNhbm5vdCB1c2UNCiAJOzsgYHRyYW1wLWZpbGUtbmFtZS1w b3J0JywgYmVjYXVzZSB0aGlzIHJldHVybnMgYWxzbw0K --94eb2c030af483b5300521201286--