Subject: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names

From: Stefan Monnier <[email-masked]>
Date: Sat, 31 Mar 2012 11:29:21 -0400

>> Still trying to figure out what's really going on inside Tramp.
>> Something I bumped into along the way (still doesn't quite explain it) is:
>> (let ((non-essential t))   (file-name-nondirectory "/sudo:")) -> "sudo:"
>> (let ((non-essential nil)) (file-name-nondirectory "/sudo:")) -> ""
>> I think it's wrong for those two to return different values.
> That's an error, and must be fixed, for sure. The correct result must be "".

Actually, I like "/sudo:" better, because the completion code gets
caught off-guard when all-completions of "/sudo:" includes "sudo:root@"
but all-completions of "/s" only include "/sudo:"; whereas it is
accustomed to situations where all-completions of "/s" includes "/sudo:"
and all-completions of "sudo:" includes "root@".

        Stefan