all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 7583@debbugs.gnu.org, Thierry Volpiatto <thierry.volpiatto@gmail.com>
Subject: bug#7583: 23.2; ido loads tramp too eagerly
Date: Wed, 19 Oct 2011 12:04:45 +0200	[thread overview]
Message-ID: <87mxcxs3eq.fsf@gmx.de> (raw)
In-Reply-To: <jwvzkgyrw4a.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 18 Oct 2011 15:04:27 -0400")

Stefan Monnier <monnier@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.





  reply	other threads:[~2011-10-19 10:04 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-07 17:38 bug#7583: 23.2; ido loads tramp too eagerly Dave Abrahams
2011-10-16  9:00 ` Michael Albinus
2011-10-19 19:31   ` Dave Abrahams
2011-10-26  8:47     ` Michael Albinus
2011-10-26 18:19       ` Dave Abrahams
2011-10-26 18:27         ` Michael Albinus
2011-10-16 18:31 ` Juanma Barranquero
2011-10-16 19:17   ` Thierry Volpiatto
2011-10-16 19:40     ` Michael Albinus
2011-10-16 21:20       ` Thierry Volpiatto
2011-10-17  6:16         ` Thierry Volpiatto
2011-10-17  7:38           ` Michael Albinus
2011-10-17 13:31           ` Stefan Monnier
2011-10-17 14:18             ` Thierry Volpiatto
2011-10-17 15:44               ` Stefan Monnier
2011-10-17 17:02                 ` Thierry Volpiatto
2011-10-17 19:36                   ` Stefan Monnier
2011-10-18  5:39                     ` Thierry Volpiatto
2011-10-18 13:22                       ` Stefan Monnier
2011-10-18 17:01                         ` Thierry Volpiatto
2011-10-18 19:04                           ` Stefan Monnier
2011-10-19 10:04                             ` Michael Albinus [this message]
2011-10-19 12:49                               ` Stefan Monnier
2011-10-19 20:33                                 ` Michael Albinus
2011-10-20 13:50                           ` Michael Albinus
2011-10-20 14:35                             ` Thierry Volpiatto
2011-10-20 18:22                               ` Michael Albinus
2011-10-20 18:43                                 ` Thierry Volpiatto
2011-10-20 18:40                               ` Stefan Monnier
2011-10-24 10:17                                 ` Michael Albinus
2011-10-27 18:29                                   ` Thierry Volpiatto
2011-10-17 15:10             ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mxcxs3eq.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=7583@debbugs.gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=thierry.volpiatto@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.