From: "Kim F. Storm" <storm@cua.dk>
Cc: emacs-devel@gnu.org
Subject: CORRECT VERSION: tramp (2.0.51); tramp and file-name-all-completions
Date: Sun, 16 Oct 2005 00:04:07 +0200 [thread overview]
Message-ID: <m3ek6m8mjs.fsf@kfs-l.imdomain.dk> (raw)
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:user@host:/file
/user@host:/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:user@host:")
(file-name-all-completions "" "/method:user@host:/file")
(file-name-all-completions "" "/user@")
(file-name-all-completions "" "/user@host:")
(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:kfs@localhost:")
=> OK
========
(file-name-all-completions "" "/telnet:kfs@localhost:/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 "" "/kfs@localhost:")
=> 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 <storm@cua.dk> http://www.cua.dk
next reply other threads:[~2005-10-15 22:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-15 22:04 Kim F. Storm [this message]
2005-10-17 4:49 ` CORRECT VERSION: tramp (2.0.51); tramp and file-name-all-completions Michael Albinus
2005-10-17 13:58 ` Kim F. Storm
2005-10-17 15:14 ` Michael Albinus
2005-10-17 17:46 ` Stefan Monnier
2005-10-18 8:51 ` Michael Albinus
2005-10-17 23:05 ` Kim F. Storm
2005-10-18 8:47 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3ek6m8mjs.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).