GNU bug report logs - #60505
29.0.60; Fido Mode and Tramp Completion

Previous Next

Package: emacs;

Reported by: Julien Roy <julien <at> jroy.ca>

Date: Tue, 3 Jan 2023 00:22:02 UTC

Severity: normal

Merged with 51386, 52758, 53513, 54042

Found in versions 28.0.50, 29.0.50, 29.0.60

Fixed in version 29.2

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #34 received at 60505 <at> debbugs.gnu.org (full text, mbox):

From: Gregory Heytings <gregory <at> heytings.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 60505 <at> debbugs.gnu.org, Julien Roy <julien <at> jroy.ca>
Subject: Re: bug#60505: 29.0.60; Fido Mode and Tramp Completion
Date: Sun, 15 Jan 2023 22:38:57 +0000
Hi Michael,

>> what do you think of that patch?  It would be regrettable to leave that 
>> bug unfixed in Emacs 29.
>
> Yes, it would be desirable to fix this. But it isn't the end of the 
> world if this doesn't happen, the problem is already evident in Emacs 
> 28, so we don't have a regression.
>

It's correct that the same problem is present in Emacs 28, but it is not 
in Emacs 27, so it's a regression.  As I tried to explain in bug#50387, 
the problem is that once Tramp is loaded, Tramp methods are returned when 
completions are requested for a root directory ("/").  This problem is 
even worse since commit d5c6bf9625: prior to that commit only the 'scp' 
and 'scpx' methods were returned (in emacs -Q), now all methods are 
returned.  And this confuses the flex and substring completion mechanisms.

>>> By the way, to limit the scope of the potential collateral damages, it 
>>> is also possible to use that condition only when completion-styles 
>>> contain 'substring' or 'flex'.
>>>
>>> What do you think of the attached patch?
>
> And what do we want to do if there are more completion-styles like this? 
> Extend Tramp then?
>

Not extend Tramp, but add them, if necessary, to the list of 
completion-styles that are handled specially by Tramp at that place. 
Unless of course a better fix has been implemented in the meantime.

>
> And there are more use cases like this, which are not working properly. 
> Think about changing the Tramp syntax to `separate', which means a 
> remote file name like "[method/user <at> host]/path/to/file". If you use 
> default completion, it works like this:
>
> - emacs -Q -l tramp --eval '(tramp-change-syntax (quote separate))'
> - Type "/ [ s TAB" and you see all methods
> - Continue with "s h / TAB" and you see nonsense :-(
> - Continue with "d TAB" and you see all possible host names starting with "d"
> - Select a host name and type "] TAB TAB" and you see the remote file names
>
> And now with fido:
>
> - emacs -Q -l tramp --eval '(tramp-change-syntax (quote separate))' -f fido-mode
> - Type "/ [ s TAB" and you see no completion at all
> - Continue with "s h / TAB" and you see the same nonsense :-(
> - Continue with "d TAB" and you see no completion at all
> - Type host name and type "] TAB TAB" and you see the remote file names
>
> Although the default completion isn't perfect (likely a Tramp bug), 
> there is much more wrong with fido.
>

Well, that looks like a separate problem, with a non-default syntax, which 
(given the number of hits of "tramp-change-syntax" on Google or on Github) 
is apparently hardly ever used.

Nonetheless, I tried your recipe with the patch applied, and the good news 
is that with it, under Fido, Tramp behaves the same way it behaves under 
the default completions: the available methods are displayed after "/ [ s 
TAB", the same nonsense is displayed after "/ [ ssh/ TAB", and the 
possible host names are displayed after typing a letter followed by TAB.

>
> Instead, Tramp shall apply a patch which is not related there, which 
> adds further dependencies, which is not working for all use cases, and 
> which is good for making more trouble in the future. My opinion.
>

I don't understand what you mean here, sorry.





This bug report was last modified 2 years and 92 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.