[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CORRECT VERSION: tramp (2.0.51); tramp and file-name-all-completions
From: |
Kim F. Storm |
Subject: |
CORRECT VERSION: tramp (2.0.51); tramp and file-name-all-completions |
Date: |
Sun, 16 Oct 2005 00:04:07 +0200 |
PLEASE IGNORE MY PREVIOUS POST
(Due to temporary brain power failure, I had swapped the args to
file-name-all-completions, so the reported ERROR/OK was swapped too).
THIS IS THE PROPER BUG REPORT.
I'm trying to make ido work sensibly with tramp syntax -- but
getting a grip on file-name-all-completions is really a nightmare.
Ido uses file-name-all-completions to get a list of all possible
completions of "the next component" to be entered by the user.
Now, consider these tramp file name:
/method:address@hidden:/file
/address@hidden:/file
/host:/file
Ideally, ido would like to call file-name-all-completions like this:
(file-name-all-completions "" "/method:")
(file-name-all-completions "" "/method:user@")
(file-name-all-completions "" "/method:address@hidden:")
(file-name-all-completions "" "/method:address@hidden:/file")
(file-name-all-completions "" "/user@")
(file-name-all-completions "" "/address@hidden:")
(file-name-all-completions "" "/host:")
However, this does not always work -- look at these examples:
========
(file-name-all-completions "" "/telnet:")
=> ERROR: "Login Failed"
Swapping the args works:
(file-name-all-completions "/telnet:" "")
=> OK
========
(file-name-all-completions "" "/telnet:kfs@")
=> ERROR: Login Failed
The desired result can be obtained with this call
(swap args, remove leading / of first arg, add / to second arg):
(file-name-all-completions "telnet:kfs@" "/")
=> OK
========
(file-name-all-completions "" "/telnet:address@hidden:")
=> OK
========
(file-name-all-completions "" "/telnet:address@hidden:/tmp")
=> OK
========
(file-name-all-completions "" "/kfs@")
=> (file-error "Opening directory" "no such file or directory" "/kfs@")
Swapping the args works:
(file-name-all-completions "/kfs@" "")
=> OK
========
(file-name-all-completions "" "/address@hidden:")
=> OK
========
(file-name-all-completions "" "/localhost:")
=> OK
========
I have made ido adapt to all these strange rules, but it is not very
nice -- and I have to know whether /xxx: is a method or a host, since:
(file-name-all-completions "" "/localhost:")
=> OK
(file-name-all-completions "" "/telnet:")
=> ERROR
(file-name-all-completions "/telnet:" "")
=> OK
Emacs : GNU Emacs 22.0.50.54 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2005-10-14 on kfs-l.imdomain.dk
Package: tramp (2.0.51)
--
Kim F. Storm <address@hidden> http://www.cua.dk
- CORRECT VERSION: tramp (2.0.51); tramp and file-name-all-completions,
Kim F. Storm <=