Subject: bug#50387: Possible bug in Tramp or in completions

From: Stefan Monnier <[email-masked]>
Date: Mon, 06 Sep 2021 16:41:15 -0400

>> Adding Stefan M in Cc.
> Yes, hopefully he can tell us what happens then.

The completion tables's API only directly support prefix completion.
So in order to implement `substring` style, when the minibuffer.el code
sees a request for completion of "/a" it will request all the
possible prefix-completions for "/" and then filter them based on the
presence of "a" in there.

Tramp can only affect the file name completion table, so all it gets to
see is a request for the set of prefix-completions of "/".
Maybe Tramp could include "/adb:" and friends in there, but Michael
probably has good reasons for not doing so.

        Stefan