emacs-devel
[Top][All Lists]
Advanced

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

Re: copy-file with two remote files behaves strangely


From: Stefan Monnier
Subject: Re: copy-file with two remote files behaves strangely
Date: Tue, 14 Aug 2001 14:08:41 -0400

> >> From: address@hidden (Kai =?iso-8859-1?q?Gro=DFjohann?=)
> >> Date: Sun, 05 Aug 2001 13:43:22 +0200
> >> 
> >> I don't think that requiring filename patterns to be nonoverlapping
> >> is the right approach, anyway.
> > 
> > However, note that the current file-name-handler machinery is
> > _entirely_ based on this assumption.  Namely, the lookup for a handler
> > is based on regexp matching against the file's name, and thus
> > overlapping file-name patterns is generally a bad idea.  That is, you
> > are suggesting a significant change in how this feature works until
> > now.

Huh? jka-compr and ange-ftp patterns overlap rather happily.
As a matter of fact, I expect that overlapping patterns on file-name-handlers
are the rule more than the exception.

> The copy-file problem is the only problem with overlapping patterns
> that I've found so far.  For all the rest, Emacs takes the first
> matching entry in file-name-handler-alist, and that works nicely.  At
> least with Tramp and ange-ftp.

I think the best solution is for copy-file to do a bit more of the work:
if both files have a magic handler (and unless both have the same handler),
copy-file should use an intermediate /tmp file.

> Oh.  Maybe my message was a bit unclear.  Just getting tar to work is
> not the problem.  I think problems begin when several filename
> handlers apply to the same file.  Then the correct processing might
> depend on the order in which the handlers are invoked.  (Though who
> can tell for sure, it's not been done yet.)
> 
> Hm.  Maybe I should try whether a gzipped file via ange-ftp works with
> jka-compr before ange-ftp in file-name-handler-alist as well as vice
> versa.

No need to try.  We already heard of problems of ordering between
jka-compr and Tramp, as well as between auto-image-file-mode and
jka (or was it ange-ftp).

I think that finding the right solution to the ordering problem will
require some work, to try and understand why it works one way and not
the other.


        Stefan




reply via email to

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