Subject: bug#26387: Issues in IDO/Tramp interaction

From: Michael Albinus <[email-masked]>
Date: Mon, 10 Apr 2017 09:35:35 +0200

Clément Pit-Claudel <[email-masked]> writes:

> On 2017-04-07 06:11, Michael Albinus wrote:
>>> 2. Running M-x shell in a buffer editing a remote file results in a
>>> prompt saying "Remote shell path: /sshx:user@host:/home/user//bin/bash
>>> (not found)".  The coorrect prompt would be
>>> "/sshx:user@host:/bin/bash".
>>
>> I get "/sudo:root@host:/root//usr/bin/tcsh [Matched]". Does /bin/bash
>> exist on your remote machine?
>
> It does. Ideally, shouldn't it print as
> "/sudo:root@host:/usr/bin/tcsh" instead of
> "/sudo:root@host:/root//usr/bin/tcsh" anyway?

Both notations are equivalent. Before being called, the file name passes
`substitute-in-file-name'.

> Currently, it shows "Shell remote path:
> /ssh:clement@host:/home/clement//bin/bash [No match]"; everything
> before "/bin/bash" is highlighted and read-only, and pressing RET
> doesn't do anything.

Only the "/home/clement/" part shall be shown differently.

> Instead I need to press C-e to get into edit mode
> then RET to get "/ssh:clement@host:/bin/bash", and finally I can
> confirm with RET.

I cannot reproduce this locally. Could you, pls, start

emacs -Q -f ido-mode

and check, whether the problem persists?

> Cheers,
> Clément.

Best regards, Michael.