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


View this message in rfc822 format

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: bug#60505: 29.0.60; Fido Mode and Tramp Completion
Date: Wed, 01 Feb 2023 18:12:43 +0000
[Message part 1 (text/plain, inline)]
>> 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.
>
> Yes. But this is not a Tramp fault.
>

It definitely is Tramp's "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.
>

What filenames are is defined for example by POSIX in its Definitions 
chapter ("Filename", "Pathname", "Pathname Resolution").  It is quite 
clear in those definitions that there is no place for a _method_ or a 
_host name_ in file names.  Something with a method, a host name and a 
path is a different beast: it's an URI.  And it's not a coincidence if 
(absolute) file names start with a slash, and URI do _not_ start with a 
slash.

Tramp decided, for a reason I do not clearly understand, to invent URIs 
starting with a slash.  File name completion mechanisms rightly assume 
that file names correspond to the standard syntax of file names, and there 
is no reason (and, for that matter, no reliable way) to fix the current 
problem at the level of completion styles.

So I have yet another proposal: add a variable to let users (and modes) 
decide whether Tramp methods should be returned when completions for the 
root directory are requested.  Patch attached.
[Improve-handling-of-Tramp-methods-by-completion-styl.patch (text/x-diff, attachment)]

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

Previous Next


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