Subject: Re: bug#79236: 30.1; file-directory-p in read-file-name prevents TRAMP protocol, user, and host completions

From: Michael Albinus <[email-masked]>
Date: Fri, 29 Aug 2025 17:22:09 +0200

Stefan Monnier <[email-masked]> writes:

Hi Stefan,

>> The appended patch seems to fix it. But I don't know whether this is the
>> way to go. Stefan?
>
> That looks ugly since the completion code should be "above" the
> `file-name-handler-alist` abstraction and thus shouldn't have
> Tramp-specific code.

We're speaking about completion of Tramp method, user and host
names. Something like "/ssh: user@ host:" - I've shown the word
boundaries as space.

`file-directory-p' does TRT in Tramp in this case. But it isn't called,
because of the bypass in `completion-file-name-table', which simply
looks for a trailing "/". `file-name-handler-alist' abstraction broken.

>         Stefan

Best regards, Michael.