From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hull Newsgroups: gmane.emacs.bugs Subject: bug#20233: 24.5rc1; tramp error opening file Date: Wed, 1 Apr 2015 09:35:24 -0700 Message-ID: References: <87h9t1znhv.fsf@gmx.de> <87twx1rpcf.fsf@gmx.de> <87fv8kwdcb.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bdc0dd24cf3520512ac4d68 X-Trace: ger.gmane.org 1427906181 14125 80.91.229.3 (1 Apr 2015 16:36:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Apr 2015 16:36:21 +0000 (UTC) Cc: 20233@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 01 18:36:13 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 1YdLci-0006Em-HQ for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Apr 2015 18:36:12 +0200 Original-Received: from localhost ([::1]:54006 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdLch-0003Ox-T5 for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Apr 2015 12:36:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdLcd-0003Oo-LK for bug-gnu-emacs@gnu.org; Wed, 01 Apr 2015 12:36:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdLcZ-00080P-5C for bug-gnu-emacs@gnu.org; Wed, 01 Apr 2015 12:36:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdLcZ-00080F-2R for bug-gnu-emacs@gnu.org; Wed, 01 Apr 2015 12:36:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YdLcX-0004rq-VY for bug-gnu-emacs@gnu.org; Wed, 01 Apr 2015 12:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Hull Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Apr 2015 16:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20233 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20233-submit@debbugs.gnu.org id=B20233.142790613318672 (code B ref 20233); Wed, 01 Apr 2015 16:36:01 +0000 Original-Received: (at 20233) by debbugs.gnu.org; 1 Apr 2015 16:35:33 +0000 Original-Received: from localhost ([127.0.0.1]:42625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YdLc4-0004r5-3N for submit@debbugs.gnu.org; Wed, 01 Apr 2015 12:35:32 -0400 Original-Received: from mail-ig0-f180.google.com ([209.85.213.180]:38555) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YdLc1-0004qr-UB for 20233@debbugs.gnu.org; Wed, 01 Apr 2015 12:35:31 -0400 Original-Received: by igbqf9 with SMTP id qf9so50990128igb.1 for <20233@debbugs.gnu.org>; Wed, 01 Apr 2015 09:35:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=UQqLY7cSqikGYSed9th6/DPnfqHPJhDx8f3+sy1YTjk=; b=CPzXVUwIMWC/snnJ9+QaqZUDYW4qNo/55HYwX5Iv2lEwNYacFvkr2MpLoW5J6F5DT6 XOKjeCxEIOVbVwRQhElBX29/tfaKVBqA2Et+Brb18EHI+7MOHS0C6Uuh+/rNQOlFyqfj WUHwqQZPXOb4tiFRcJ3kFLJvztg/Y5tYLfd1paDbKFNhR3ICGZ9RbLffuQpJaOgY8+R+ N+osW9d0yF7vjeR0MNw2K7OOXBnetUjaYnRctAEze1TzaPI8t9UZ2NC3DOamYBfs2uqs 9tWKC/4QfN4JHRhEcRXrW4Yw9fblLTWyoHLWwgYvE7Qp6TpOjaNl2hoE/vBBqC+Jfa8F eG0Q== X-Gm-Message-State: ALoCoQkF293DWTFK02HXepaIfLUnEqX+zYQOQWUMOHF4r7wJi0/GVkiBsZvGKMcq0ECtWjUzLLmk X-Received: by 10.50.66.141 with SMTP id f13mr13670093igt.9.1427906124108; Wed, 01 Apr 2015 09:35:24 -0700 (PDT) Original-Received: by 10.64.149.2 with HTTP; Wed, 1 Apr 2015 09:35:24 -0700 (PDT) In-Reply-To: <87fv8kwdcb.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: 140.186.70.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:101118 Archived-At: --047d7bdc0dd24cf3520512ac4d68 Content-Type: text/plain; charset=UTF-8 Yes, that patch fixes the problem for me. Thanks! On Tue, Mar 31, 2015 at 11:51 PM, Michael Albinus wrote: > [Please keep the Cc, for the public] > > David Hull writes: > > Hi David, > > > The scp command succeeded: > > > > $ cd /tmp > > $ rm -f > > /var/folders/y9/k3f9vqgn73gf64x8ktywlkd10r0222/T/tramp.110640VR.erl > > $ scp -p -q -r -o ControlMaster=auto -o ControlPath='tramp.%r@%h:%p' - > > o ControlPersist=no > > > cos6\:/home/david.hull/src/ds-advertiser-server/src/ds_adv_ox3_lineitem_v3.erl > > /var/folders/y9/k3f9vqgn73gf64x8ktywlkd10r0222/T/tramp.110640VR.erl > > $ echo $? > > 0 > > $ ls -l > > /var/folders/y9/k3f9vqgn73gf64x8ktywlkd10r0222/T/tramp.110640VR.erl > > -rw-r--r-- 1 david.hull staff 11905 Mar 31 14:02 > > /var/folders/y9/k3f9vqgn73gf64x8ktywlkd10r0222/T/tramp.110640VR.erl > > > > I wonder if the problem could be that the ControlPath option doesn't > > specify a directory? > > Yes, indeed. This was changed back in February due to Bug#19861. > > > I did a test. I put a "scp" shell script in my $HOME/bin directory > > with the following contents: > > > > #! /bin/bash > > WD=`pwd` > > echo "$WD: scp $*" >>/tmp/scp.out > > /usr/bin/scp "$@" > > > > When I attempted to use tramp, /tmp/scp.out had the following > > contents: > > > > /: scp -p -q -r -o ControlMaster=auto -o ControlPath=tramp.%r@%h:%p -o > > ControlPersist=no > > > cos6:/home/david.hull/src/ds-advertiser-server/src/ds_adv_ox3_lineitem_v3.erl > > /var/folders/y9/k3f9vqgn73gf64x8ktywlkd10r0222/T/tramp.16189hTW.erl > > > > Note that the first thing on the line, the working directory, is "/". > > Could you, pls, check whether the following patch works for you? It is a > backport from Emacs 25.0.50: > > --8<---------------cut here---------------start------------->8--- > *** /home/albinus/src/emacs-24/lisp/net/tramp.el.~emacs-24~ 2015-04-01 > 08:47:21.556209883 +0200 > --- /home/albinus/src/emacs-24/lisp/net/tramp.el 2015-04-01 > 08:47:21.660211724 +0200 > *************** > *** 3355,3364 **** > > (defun tramp-handle-unhandled-file-name-directory (_filename) > "Like `unhandled-file-name-directory' for Tramp files." > ! ;; With Emacs 23, we could simply return `nil'. But we must keep it > ! ;; for backward compatibility. "~/" cannot be returned, because > ! ;; there might be machines without a HOME directory (like hydra). > ! "/") > > (defun tramp-handle-set-visited-file-modtime (&optional time-list) > "Like `set-visited-file-modtime' for Tramp files." > --- 3355,3365 ---- > > (defun tramp-handle-unhandled-file-name-directory (_filename) > "Like `unhandled-file-name-directory' for Tramp files." > ! ;; Starting with Emacs 23, we must simply return `nil'. But we must > ! ;; keep backward compatibility, also with XEmacs. "~/" cannot be > ! ;; returned, because there might be machines without a HOME > ! ;; directory (like hydra). > ! (and (< emacs-major-version 23) "/")) > > (defun tramp-handle-set-visited-file-modtime (&optional time-list) > "Like `set-visited-file-modtime' for Tramp files." > --8<---------------cut here---------------end--------------->8--- > > Best regards, Michael. > -- David Hull --047d7bdc0dd24cf3520512ac4d68 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yes, that patch fixes the problem for me. Thanks!

On Tue, Mar 31, = 2015 at 11:51 PM, Michael Albinus <michael.albinus@gmx.de> wrote:
[Please keep the Cc, for the p= ublic]

David Hull <david.hull@openx.com= > writes:

Hi David,

> The scp command succeeded:
>
> $ cd /tmp
> $ rm -f
> /var/folders/y9/k3f9vqgn73gf64x8ktywlkd10r0222/T/tramp.110640VR.erl > $ scp -p -q -r -o ControlMaster=3Dauto -o ControlPath=3D'tramp.%r@= %h:%p' -
> o ControlPersist=3Dno
> cos6\:/home/david.hull/src/ds-advertiser-server/src/ds_adv_ox3_lineite= m_v3.erl
> /var/folders/y9/k3f9vqgn73gf64x8ktywlkd10r0222/T/tramp.110640VR.erl > $ echo $?
> 0
> $ ls -l
> /var/folders/y9/k3f9vqgn73gf64x8ktywlkd10r0222/T/tramp.110640VR.erl > -rw-r--r-- 1 david.hull staff 11905 Mar 31 14:02
> /var/folders/y9/k3f9vqgn73gf64x8ktywlkd10r0222/T/tramp.110640VR.erl >
> I wonder if the problem could be that the ControlPath option doesn'= ;t
> specify a directory?

Yes, indeed. This was changed back in February due to Bug#19861.

> I did a test. I put a "scp" shell script in my $HOME/bin dir= ectory
> with the following contents:
>
> #! /bin/bash
> WD=3D`pwd`
> echo "$WD: scp $*" >>/tmp/scp.out
> /usr/bin/scp "$@"
>
> When I attempted to use tramp, /tmp/scp.out had the following
> contents:
>
> /: scp -p -q -r -o ControlMaster=3Dauto -o ControlPath=3Dtramp.%r@%h:%= p -o
> ControlPersist=3Dno
> cos6:/home/david.hull/src/ds-advertiser-server/src/ds_adv_ox3_lineitem= _v3.erl
> /var/folders/y9/k3f9vqgn73gf64x8ktywlkd10r0222/T/tramp.16189hTW.erl >
> Note that the first thing on the line, the working directory, is "= ;/".

Could you, pls, check whether the following patch works for you? It = is a
backport from Emacs 25.0.50:

--8<---------------cut here---------------start------------->8---
*** /home/albinus/src/emacs-24/lisp/net/tramp.el.~emacs-24~=C2=A0 =C2=A0 = =C2=A02015-04-01 08:47:21.556209883 +0200
--- /home/albinus/src/emacs-24/lisp/net/tramp.el=C2=A0 =C2=A0 =C2=A0 =C2=A0= 2015-04-01 08:47:21.660211724 +0200
***************
*** 3355,3364 ****

=C2=A0 (defun tramp-handle-unhandled-file-name-directory (_filename)
=C2=A0 =C2=A0 "Like `unhandled-file-name-directory' for Tramp file= s."
!=C2=A0 =C2=A0;; With Emacs 23, we could simply return `nil'.=C2=A0 But= we must keep it
!=C2=A0 =C2=A0;; for backward compatibility.=C2=A0 "~/" cannot be= returned, because
!=C2=A0 =C2=A0;; there might be machines without a HOME directory (like hyd= ra).
!=C2=A0 =C2=A0"/")

=C2=A0 (defun tramp-handle-set-visited-file-modtime (&optional time-lis= t)
=C2=A0 =C2=A0 "Like `set-visited-file-modtime' for Tramp files.&qu= ot;
--- 3355,3365 ----

=C2=A0 (defun tramp-handle-unhandled-file-name-directory (_filename)
=C2=A0 =C2=A0 "Like `unhandled-file-name-directory' for Tramp file= s."
!=C2=A0 =C2=A0;; Starting with Emacs 23, we must simply return `nil'.= =C2=A0 But we must
!=C2=A0 =C2=A0;; keep backward compatibility, also with XEmacs.=C2=A0 "= ;~/" cannot be
!=C2=A0 =C2=A0;; returned, because there might be machines without a HOME !=C2=A0 =C2=A0;; directory (like hydra).
!=C2=A0 =C2=A0(and (< emacs-major-version 23) "/"))

=C2=A0 (defun tramp-handle-set-visited-file-modtime (&optional time-lis= t)
=C2=A0 =C2=A0 "Like `set-visited-file-modtime' for Tramp files.&qu= ot;
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.



--
David Hull
--047d7bdc0dd24cf3520512ac4d68--