Subject: bug#60505: 29.0.60; Fido Mode and Tramp Completion

From: Michael Albinus <[email-masked]>
Date: Sat, 04 Feb 2023 17:04:49 +0100

Stefan Monnier <[email-masked]> writes:

Hi Stefan,

>>> I didn't remember this part of the design, but it sounds good and does
>>> make changes to that part (like the proposed patch) "safer", so it's
>>> probably OK to try it on `master`.
>> There is no special design for it. Ordinary file name handler machinery.
>
> I was referring to the design choice of approximating "completion
> context" by "partial Tramp file name".

According to the ChangeLog, this was added to Tramp in August 2002. I
don't remember a public discussion about, it was just agreed between Kai
and me.

>>> I wonder how this patch interacts with `locate-dominating-file`.
>> I'll check tomorrow. But since there isn't a slash in such filenames
>> (except the leading one), I expect it shall work. Needs more testing,
>> this case and other use cases.
>
> I was thinking of what happens when `locate-dominating-file` does:
>
>       try /ssh:host:./foo/bar/.git
>       try /ssh:host:./foo/.git
>       try /ssh:host:./.git
>     ? try /ssh:.git      ?
>       try /.git

Don't know. Likely no problem, because

(file-name-directory (directory-file-name "/ssh:host:"))
=> "/ssh:host:"

Perhaps it is a good idea anyway, to add a regexp matching "/ssh:host:"
to locate-dominating-stop-dir-regexp.

> -- Stefan

Best regards, Michael.