[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CORRECT VERSION: tramp (2.0.51); tramp and file-name-all-completion
From: |
Kim F. Storm |
Subject: |
Re: CORRECT VERSION: tramp (2.0.51); tramp and file-name-all-completions |
Date: |
Mon, 17 Oct 2005 15:58:27 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Michael Albinus <address@hidden> writes:
> I've committed a new tramp.el into Emacs CVS, please try this. Note
> that that I have set tramp-default-method to "ftp", therefore the
> results are slightly different. And my telnetd is disabled by default;
> I've used ssh therefore.
Initial testing shows that it works much better than before.
Thanks!
>
> (file-name-all-completions "" "/address@hidden:")
> This returns nil. Likely it is an ange-ftp behaviour.
Seems like it, yes. Works OK with telnet.
> (file-name-all-completions "" "/address@hidden:./") returns the
> desired values.
> (file-name-all-completions "" "/localhost:./")
Thanks for the tips.
I used it in ido, and it seems to work:
;; work around bug in ange-ftp.
;; /ftp:address@hidden: => nil
;; /ftp:address@hidden:./ => ok
(and
(not (string= "/ftp:" dir))
(or
(string-match "\\`/ftp:.*:\\'" dir)
(and (string= tramp-default-method "ftp")
(string-match "\\`/[^/:]+:\\'" dir)))
(file-name-all-completions "" (concat dir "./"))))))
There are still a small problem (I have worked around them in ido,
so a fix is not urgent.)
E.g. if I try
(file-directory-p "/telnet:kfs@")
or
(file-directory-p "/telnet:kfs@:")
tramp signals "Login failure" in both cases.
Similar things happens for expand-file-name.
Here is a backtrace:
Debugger entered--Lisp error: (error "Login failed")
signal(error ("Login failed"))
error("Login failed")
tramp-process-actions(#<process *tramp/ssh telnet*> nil nil nil "telnet"
((tramp-password-prompt-regexp tramp-action-password)
(tramp-login-prompt-regexp tramp-action-login) (shell-prompt-pattern
tramp-action-succeed) (tramp-shell-prompt-pattern tramp-action-succeed)
(tramp-wrong-passwd-regexp tramp-action-permission-denied)
(tramp-yesno-prompt-regexp tramp-action-yesno) (tramp-yn-prompt-regexp
tramp-action-yn) (tramp-terminal-prompt-regexp tramp-action-terminal)
(tramp-process-alive-regexp tramp-action-process-alive)))
tramp-open-connection-rsh(nil nil nil "telnet")
tramp-maybe-open-connection(nil nil nil "telnet")
tramp-send-command(nil nil nil "telnet" "cd ~; pwd" t)
tramp-handle-expand-file-name("/telnet:kfs@" "/home/kfs/fsf/latest/")
apply(tramp-handle-expand-file-name ("/telnet:kfs@" "/home/kfs/fsf/latest/"))
tramp-sh-file-name-handler(expand-file-name "/telnet:kfs@"
"/home/kfs/fsf/latest/")
apply(tramp-sh-file-name-handler expand-file-name ("/telnet:kfs@"
"/home/kfs/fsf/latest/"))
tramp-file-name-handler(expand-file-name "/telnet:kfs@"
"/home/kfs/fsf/latest/")
expand-file-name("/telnet:kfs@" "/home/kfs/fsf/latest/")
apply(expand-file-name ("/telnet:kfs@" "/home/kfs/fsf/latest/"))
tramp-completion-run-real-handler(expand-file-name ("/telnet:kfs@"
"/home/kfs/fsf/latest/"))
tramp-completion-handle-expand-file-name("/telnet:kfs@"
"/home/kfs/fsf/latest/")
apply(tramp-completion-handle-expand-file-name ("/telnet:kfs@"
"/home/kfs/fsf/latest/"))
tramp-completion-file-name-handler(expand-file-name "/telnet:kfs@"
"/home/kfs/fsf/latest/")
file-directory-p("/telnet:kfs@")
eval((file-directory-p "/telnet:kfs@"))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp)
--
Kim F. Storm <address@hidden> http://www.cua.dk