bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50387: Possible bug in Tramp or in completions


From: Michael Albinus
Subject: bug#50387: Possible bug in Tramp or in completions
Date: Mon, 06 Sep 2021 10:18:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Gregory Heytings <gregory@heytings.org> writes:

Hi Gregory,

> I analyzed this bug a bit further, and the root problem is that
>
> (tramp-completion-handle-file-name-all-completions "" "/")
>
> returns ("sshfs:" "ssh:" "sshx:" ...) when tramp-default-method is
> "ssh", and ("scp:" "scpx:" ...) when tramp-default-method is "scp".
>
> This happens because "possible methods" are added to the result in
> tramp-completion-handle-file-name-all-completions.
>
> Therefore completion-substring-try-completion finds that "ssh:" is
> already a complete match.
>
> I'm not sure how this bug should be fixed.  Removing these two lines
> from that function fixes the bug, but that's not really optimal
> because in that case /s TAB does not show "ssh:", "sshfs:" and "sshx:"
> anymore.  Not displaying these completions is perhaps better than not
> displaying hostnames, however.

Tramp doesn't know anything about completion-styles, it just implements
file-name-all-completions and file-name-completion. Cutting valid
results from those functions seems to be wrong, IMO.

Best regards, Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]