emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: `file-relative-name' for compressed files


From: Michael Albinus
Subject: Re: `file-relative-name' for compressed files
Date: Wed, 16 Jun 2004 07:11:54 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     > It seems that TRAMP's `tramp-file-name-regexp-unified' ("\\`/[^/:]+:")
>     > should be reworked to account for its extended filename syntax.
>
>     Instead of trusting that a regexp in file-name-handler-alist matches
>     the "remote" part of a filename (that's not documented this way), it
>     would be more clean to ask explicitely for it. Maybe a new function:
>
> That solution would work, and if no smaller change will work, we can
> do it that way.  But it would be nice if we could fix this without
> changing the larger structure.  Can someone see if that can be done?

`tramp-file-name-regexp-unified' is already complete covering the
remote part of a filename, that's not the problem.

There is another handler `tramp-completion-file-name-handler' which
comes first. Because of syntax ambiguity of Tramp filenames, it covers
valid Tramp filenames as well. "/ssh:foo" can be the file "foo" on the
host "ssh" as well as the (to be completed) string meaning method
"ssh" accessing host "foo".

Obviously, the regexp for `tramp-completion-file-name-handler' must
handle such cases. And therefore it is not suited for the test
performed in `file-relative-name', where it is assumed that the regexp
of a handler covers the complete remote part of a filename.

Best regards, Michael.




reply via email to

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