emacs-devel
[Top][All Lists]
Advanced

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

Re: tramp (2.0.51); tramp and file-name-all-completions


From: Michael Albinus
Subject: Re: tramp (2.0.51); tramp and file-name-all-completions
Date: Sun, 16 Oct 2005 21:56:39 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

"Richard M. Stallman" <address@hidden> writes:

> I would say these problems are all bugs in tramp.

Yes.

> file-name-all-completions has a simple spec,
> and in principle it ought to work "right" for all meaningful args.

The problem is the syntactical ambiguity of Tramp file
names. (file-name-all-completions "" "/telnet:") can mean completion
of user and host names for method "telnet", or completion of file
names for method "ssh" on host "telnet".

When I wrote completion code for Tramp 3 years ago, I've introduced a
somehow obscure heuristic determining what is meant. This works more or
less the usual cases, but it breaks ido.

I've dropped a comment in the TODO "must be changed when we know it
better". It seems to be the time now.

> If there are some cases where it is just hopeless to ask tramp
> to do completion correctly, we could decide on some return value
> that means "unable to do the job right".

I don't think so. It is not a tragedy when file-name-all-completions
does not return the most complete list. Given the example above,
something like ("telnet:127.0.0.1:" "telnet:localhost.local:") would
be sufficient, even if there is a host called "telnet". Only when
completion of the method returns nil, one might try file name
completion.

I'm sitting already the whole day on this problem.

Best regards, Michael.




reply via email to

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