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

From: Gregory Heytings <[email-masked]>
Date: Thu, 05 Jan 2023 14:14:35 +0000

>> 2. Doing that is not enough, because of an incompatibility between 
>> Tramp and the 'flex' and 'substring' mechanisms.  The Tramp manual has 
>> a footnote which mentions that incompatibility: "Some completion 
>> styles, like `substring' or `flex', require to type at least one 
>> character after the trailing `:'."  A one-line patch to fix it was 
>> proposed, but rejected, a year and a half ago.  It is attached to this 
>> email, and you can use it locally.  As I said in the bug thread in 
>> which that patch was proposed: "I expect other bug reports from 
>> confused users".
>
> I don't deny that there is a problem, and it isn't a surprise that 
> people report about. But I don't think that Tramp misbehaves, it does 
> exactly what it is specified to do.
>

You may remind that we disagreed on that point.  When a connection method 
has already been fully specified by the user, such as "/ssh:", there is no 
reason Tramp should tell the user that there are two other connection 
methods "/sshfs:" and "/sshx:".  IOW, after

C-x C-f /ssh TAB

it makes sense to tell the user that there are three possible methods: 
"/ssh:", "/sshfs:" and "/sshx:".  But after

C-x C-f /ssh: TAB

there is no reason to do that again.  What the user expects at that point 
is a list of hostnames.

>
> I guess that flex and friends use completion out of the specification. 
> But I have no knowledge about the completion machinery; otherwise I 
> would have tried to find the root of the problem. I'm also not opposed 
> to extend the completion API for use in Tramp. What I'm opposed to is to 
> apply just an ad-hoc patch, which could have collateral damages.
>
> I still hope that somebody with more knowledge about the completion 
> machinery could take a stab at it.
>

Why could we not use the ad-hoc patch, with a FIXME note, until somebody 
has the time to find a better solution, instead of letting bug reports 
about that problem accumulate?  Sure, it could possibly have a collateral 
damage, but it could as well have no collateral damage at all.