[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9793: 24.0.90; Unwanted tramp connection on eshell completion.
From: |
Stefan Monnier |
Subject: |
bug#9793: 24.0.90; Unwanted tramp connection on eshell completion. |
Date: |
Tue, 25 Oct 2011 08:16:31 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) |
> Tramp has some code to guess whether it is in completion mode.
Yuck!
> Check of `non-essential' is one proof,
Actually, no. non-essential could be used for other things than completion.
> checking the last keyboard input (being TAB, or not) is another one.
Yuck!
> If Tramp finds out that it is in completion mode, it suppresses some
> remote actions, like expand-file-name. Since your code
> (let ((default-directory "/")) (file-directory-p "tequila:"))
> does not show an evidence of the completion mode, all remote actions are
> performed.
OK, so now I know why the two behaved differently.
> The actions for `file-directory-p' are never been suppressed, that's why
> Tramp performs them also when being in completion mode.
Good.
>> In shell-mode completion also understands Tramp file names (yup, that's
>> a bug, we should probably default comint-file-name-prefix to "/:/"), so
>> that's not the problem.
> Better not. There are still needed checks in shell.el, which are applied
> to remote files. `comint-file-name-prefix keeps the remote part of those
> files.
I do not propose to remove the variable. Only to make it default to
"/:/" (instead of just "").
>>> But this makes the trouble with the completion predicate
>>> `file-directory-p'.
>> Yup, I think we should somehow make it so Tramp can say
>> (file-directory-p "/tequila:") => t
>> without trying to connect to tequila (after all, even if we can't
>> connect to tequila, this is still a "directory", just one we currently
>> can't access).
> That was the intention of my patch :-)
> Return t in case of remote files.
But that's not what I suggest. I suggest to "blindly" return t for
/<host>: only (as well as things like /ssh:<host>: I guess), but not for
/<host>:<path> where we'd still connect and test whether it's indeed
a directory.
> Inside Tramp it could be behave such a way when it detects it is in
> completion mode. That means, when `non-essential' is set to t. Shall I
> do it this way?
I suggest to do that regardless of whether we're in completion mode
or not.
Stefan
- bug#9793: 24.0.90; Unwanted tramp connection on eshell completion., (continued)
- bug#9793: 24.0.90; Unwanted tramp connection on eshell completion., Stefan Monnier, 2011/10/19
- bug#9793: 24.0.90; Unwanted tramp connection on eshell completion., Thierry Volpiatto, 2011/10/20
- bug#9793: 24.0.90; Unwanted tramp connection on eshell completion., Stefan Monnier, 2011/10/20
- bug#9793: 24.0.90; Unwanted tramp connection on eshell completion., Thierry Volpiatto, 2011/10/20
- bug#9793: 24.0.90; Unwanted tramp connection on eshell completion., Michael Albinus, 2011/10/22
- bug#9793: 24.0.90; Unwanted tramp connection on eshell completion., Thierry Volpiatto, 2011/10/22
- bug#9793: 24.0.90; Unwanted tramp connection on eshell completion., Stefan Monnier, 2011/10/23
- bug#9793: 24.0.90; Unwanted tramp connection on eshell completion., Michael Albinus, 2011/10/24
- bug#9793: 24.0.90; Unwanted tramp connection on eshell completion., Stefan Monnier, 2011/10/24
- bug#9793: 24.0.90; Unwanted tramp connection on eshell completion., Michael Albinus, 2011/10/25
- bug#9793: 24.0.90; Unwanted tramp connection on eshell completion.,
Stefan Monnier <=
- bug#9793: 24.0.90; Unwanted tramp connection on eshell completion., Michael Albinus, 2011/10/25