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

From: Stefan Monnier <[email-masked]>
Date: Thu, 02 Feb 2023 10:16:51 -0500

> Yes. But this is not a Tramp fault. Completion styles like flex (and
> substring, didn't test) do ignore Tramp file name syntax. They simply
> think in terms of file name parts, separated by "/". This is not
> appropriate for remote file names.

Actually, completion styles don't know whether they're completing file
names or not and don't really know that "/" is special in file name syntax.

This is done by `completion-file-name-table` instead.  This one, in turn
tries not to pay attention to "/" either, and to rely on file-name
functions instead (e.g. `file-name-directory`).

> Tramp knows only file-name-completion and file-name-all-completions.

Tramp could also influence the completion behavior via the other
file-name functions.
E.g. defining (file-name-directory "/ssh:foo") => "/ssh:" could fix some
of the flex completion cases discussed here.
[ Note: I'm not actually suggesting that this is the solution.
  It would likely come with its own set of problems.  ]

        Stefan