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

From: Eli Zaretskii <[email-masked]>
Date: Fri, 15 Aug 2025 09:08:09 +0300

> Date: Fri, 15 Aug 2025 04:44:05 +0300
> From: Dmitry Gutov <[email-masked]>
> 
> Timothy, thanks for the report.
> 
> Michael, what do you think? Could this be fixed in Tramp's completion, 
> or is there maybe a better way to use read-directory-name from 
> project-prompt-project-dir?

Careful: there be dragons.  We don't want Tramp to load and do its
thing when there's no reason to expect remote files and directories
are relevant, because that slows down completion when the user only
wants to visit a local file or directory.  There was such a problem
some years ago, and Michael fixed it.

So whatever you do for this case, be sure not to cause regressions in
the use cases where the user just wants to visit local files: Tramp
should neither load nor attempt to connect to remote servers in that
case.