From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#60505: 29.0.60; Fido Mode and Tramp Completion Date: Sun, 15 Jan 2023 22:38:57 +0000 Message-ID: References: <87k024918k.fsf@jroy.ca> <8dea9f3e0e411c315b04@heytings.org> <87tu15m6g7.fsf@gmx.de> <8dea9f3e0eb47ac9e4ab@heytings.org> <371ba1d0be1f14c7c798@heytings.org> <8aadf0ddd54d67a3213d@heytings.org> <87a62jmwj6.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28043"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60505@debbugs.gnu.org, Julien Roy To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 15 23:39:35 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHBf4-00072l-0J for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 15 Jan 2023 23:39:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHBeb-0006NH-BS; Sun, 15 Jan 2023 17:39:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHBeZ-0006Mz-G7 for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2023 17:39:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHBeZ-0004yj-7h for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2023 17:39:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pHBeZ-0008Ra-2r for bug-gnu-emacs@gnu.org; Sun, 15 Jan 2023 17:39:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 15 Jan 2023 22:39:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60505 X-GNU-PR-Package: emacs Original-Received: via spool by 60505-submit@debbugs.gnu.org id=B60505.167382234132436 (code B ref 60505); Sun, 15 Jan 2023 22:39:03 +0000 Original-Received: (at 60505) by debbugs.gnu.org; 15 Jan 2023 22:39:01 +0000 Original-Received: from localhost ([127.0.0.1]:59866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHBeW-0008R6-EU for submit@debbugs.gnu.org; Sun, 15 Jan 2023 17:39:00 -0500 Original-Received: from heytings.org ([95.142.160.155]:45984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHBeV-0008Qy-0v for 60505@debbugs.gnu.org; Sun, 15 Jan 2023 17:38:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1673822337; bh=a857iBmGbjMDXLgzUirNGWz1lrQKdQYVsK15XiAZlxw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=T21yJwCiFx9x80Mgq/E91htBT9mgUutgm9sXnMPa/XhTO1iBzdNkIlNq/ZBeVqHLI kvH39Lw7fUig3e0hmUdnxdX5pYnaUJy8Qzcbs1gMQSA94T2GpNI5D5ZRnSPGiuNIwn kQdKScKvd9ZVgt2wreJjqQ7DCasgfWe1lKbSWX1vmFMpgD+WfWSLYyPf1ToX4k0Isi Vhr4H5/H3JhnMb/TPSHr1ktvuj0eHOIZ8zcdRt85NDfwrvm2ADEAUiqt8ohL3+doGO Rne4kH1lqOkFf2/8dwY6viYaT2wABgil4L+X6tINtSb/GNua8xMPA5Oh6/+/jKm4Jx oi1pp/XpCtBKA== In-Reply-To: <87a62jmwj6.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253452 Archived-At: Hi Michael, >> what do you think of that patch? It would be regrettable to leave that >> bug unfixed in Emacs 29. > > Yes, it would be desirable to fix this. But it isn't the end of the > world if this doesn't happen, the problem is already evident in Emacs > 28, so we don't have a regression. > 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. >>> By the way, to limit the scope of the potential collateral damages, it >>> is also possible to use that condition only when completion-styles >>> contain 'substring' or 'flex'. >>> >>> What do you think of the attached patch? > > And what do we want to do if there are more completion-styles like this? > Extend Tramp then? > Not extend Tramp, but add them, if necessary, to the list of completion-styles that are handled specially by Tramp at that place. Unless of course a better fix has been implemented in the meantime. > > And there are more use cases like this, which are not working properly. > Think about changing the Tramp syntax to `separate', which means a > remote file name like "[method/user@host]/path/to/file". If you use > default completion, it works like this: > > - emacs -Q -l tramp --eval '(tramp-change-syntax (quote separate))' > - Type "/ [ s TAB" and you see all methods > - Continue with "s h / TAB" and you see nonsense :-( > - Continue with "d TAB" and you see all possible host names starting with "d" > - Select a host name and type "] TAB TAB" and you see the remote file names > > And now with fido: > > - emacs -Q -l tramp --eval '(tramp-change-syntax (quote separate))' -f fido-mode > - Type "/ [ s TAB" and you see no completion at all > - Continue with "s h / TAB" and you see the same nonsense :-( > - Continue with "d TAB" and you see no completion at all > - Type host name and type "] TAB TAB" and you see the remote file names > > Although the default completion isn't perfect (likely a Tramp bug), > there is much more wrong with fido. > Well, that looks like a separate problem, with a non-default syntax, which (given the number of hits of "tramp-change-syntax" on Google or on Github) is apparently hardly ever used. Nonetheless, I tried your recipe with the patch applied, and the good news is that with it, under Fido, Tramp behaves the same way it behaves under the default completions: the available methods are displayed after "/ [ s TAB", the same nonsense is displayed after "/ [ ssh/ TAB", and the possible host names are displayed after typing a letter followed by TAB. > > Instead, Tramp shall apply a patch which is not related there, which > adds further dependencies, which is not working for all use cases, and > which is good for making more trouble in the future. My opinion. > I don't understand what you mean here, sorry.