tramp-devel
[Top][All Lists]
Advanced

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

Re: tramp-handle-insert-file-contents broken


From: Kai Großjohann
Subject: Re: tramp-handle-insert-file-contents broken
Date: Sat, 28 Jun 2003 16:05:57 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Andreas Schwab <address@hidden> writes:

> The recent import of Tramp 2.0.35 into the Emacs repository has broken
> insert-file-contents of remote VC controlled files.  Since vc-registered
> calls insert-file-contents, and both have a tramp handler, the latter is
> called with the tramp handlers disabled, so file-local-copy in
> tramp-handle-insert-file-contents always returns nil.

Okay, so it seems that the following is happening:

vc-registered looks for a handler and finds Tramp.  So it invokes
Tramp.  But Tramp does not really *have* a handler for vc-registered,
so it inhibits itself and calls the real vc-registered again.  This
ought to result in vc-registered doing the right thing, but the normal
vc-registered (indirectly) invokes insert-file-contents, which ought
to be handled by Tramp, but isn't, because Tramp was just inhibiting
itself.

Ick.

I guess that the recent change to tramp-handle-insert-file-contents
turned this up.

One thing I don't understand is why is vc-registered a magic
operation?  Hm.  Oh, I get it: the reason is that VC wants to allow
file handlers to change the way programs are run on the VC-controlled
files.

But IMHO this is not the right way to do it.  The right way to do it
is to frob the vc-do-shell-command function and its friends.  By just
changing those, all of the rest of VC functions well for remote files.

So where do we go from here?  Any advice?

Han,

you might wish to test whether Tramp works on a file that is not
controlled by CVS or RCS or suchlike.  That would confirm my
suspicion that the problem reported by Andreas is also the cause of
the errors you're seeing.

-- 
~/.signature




reply via email to

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