GNU bug report logs -
#7583
23.2; ido loads tramp too eagerly
Previous Next
Reported by: Dave Abrahams <dave <at> boostpro.com>
Date: Tue, 7 Dec 2010 17:34:01 UTC
Severity: normal
Found in version 23.2
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:
>> To e.g "/ssh:" which is an incomplete address
>> and hang indefinitely.
>> Just like when you do C-x C-f and enter in prompt /ssh: and press RET.
>
> I'm beginning to understand. Indeed, I see that C-x C-f /ssh: RET and
> C-x C-f /sudo: RET both behave oddly (they try to connect to hosts `ssh'
> or `sudo'). They don't hang for me, but arguably they should not even
> try to treat the "ssh" or "sudo" as a hostname.
Why that? It is legal to have a hostname "ssh". Anybody can create such
an entry in ~/.ssh/config. Or an alias in /etc/hosts, or a DNS alias.
What we are speaking about is filename completion. If you enter RET, we
do not speak about completion anymore, but opening a file "/ssh:", using
Tramp's default connection method, which ought to be "scp" on GNU/Linux.
> ..Oh, wait, I think I see something interesting:
>
> % emacs -Q
> C-x C-f /ssh: TAB RET RET
> C-x C-f /ssh: TAB
>
> The first C-x C-f just ends up loading Tramp then trying to connect to
> `ssh' and fail, but it also changes something inside Tramp because on
> the second C-x C-f the TAB causes Tramp to try to connect some "default"
> host (apparently it uses the first host in my ~/.ssh/config, and
> subsequent attempts will try subsequent hosts in that file).
>
> We don't want that, and your completion scheme might be bumping into
> this very problem.
Tramp has always the problem to understand what "C-x C-f /ssh: TAB"
means. This is due to the syntactic ambiguity of Tramp's file names
("ssh" can be both in this case, a method or a hostname).
[Side remark: with XEmacs, we use another syntax. There aren't such
problems. But I guess it is much too late to change the syntax for GNU
Emacs.]
I will try to change Tramp's completion algorithm such a way, that in
case "C-x C-f /foo: TAB" is pressed, and "foo" is a method found in
(mapcar 'car tramp-methods), Tramp does not check "foo" being a
hostname. This shall be sufficient for the incrimed case.
> Stefan
Best regards, Michael.
This bug report was last modified 13 years and 211 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.