tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Update on wrong-type-argument error from find-file-noselect-1


From: Francis Litterio
Subject: Update on wrong-type-argument error from find-file-noselect-1
Date: Thu, 10 Oct 2002 13:20:00 -0400
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-msvc-nt5.0.2195)

In an earlier message to this list, I reported that I had to make the
following change to tramp.el to get TRAMP working with NT Emacs and
Cygwin's scp:

>       ***************
>       *** 3113,3118 ****
>       --- 3113,3119 ----
>           "Like `insert-file-contents' for tramp files."
>           (barf-if-buffer-read-only)
>           (setq filename (expand-file-name filename))
>       +   (setq buffer-file-name filename)
>           (with-parsed-tramp-file-name filename nil
>             (when (tramp-ange-ftp-file-name-p multi-method method user host)
>               (tramp-invoke-ange-ftp 'insert-file-contents
>
>    This may not be the right thing to do, but it prevents a
>    wrong-type-argument error from vc-file-not-found-hook and from
>    find-file-noselect-1 when they each evaluate (file-truename
>    buffer-file-name) with buffer-file-name set to nil.

Kai told me the above change was the wrong thing to do:

> It is indeed not the right thing to do, since (if I understand
> correctly) this means that buffer-file-name changes if you do C-x i
> /some/other/file RET (if the other file is remote so that the above
> code is executed).
> 
> Can you find out why vc-file-not-found-hook and find-file-noselect-1
> complain when it is done via Tramp but not for local files?  Maybe
> the problem can be solved another way.

Well, now that I'm using my "scpwrapper" script (which transforms local
pathnames from "c:/path/name" to "/cygdrive/c/path/name" to avoid
confusing Cygwin's scp), I no longer have the problem!  The above patch
is not needed.

I'm not inclined to investigate further, since the problem only happened
when Cygwin's scp failed to copy the remote file to the local temporary
directory.
--
Francis Litterio
address@hidden
http://world.std.com/~franl/
GPG and PGP public keys available on keyservers.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]