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: Thu, 05 Jan 2023 13:07:51 +0000 Message-ID: <8dea9f3e0e411c315b04@heytings.org> References: <87k024918k.fsf@jroy.ca> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="I2NM39P0iC" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13359"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60505@debbugs.gnu.org To: Julien Roy Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 05 14:08:52 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 1pDPzI-0003FC-0l for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Jan 2023 14:08:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDPyX-0004zu-4Q; Thu, 05 Jan 2023 08:08: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 1pDPyU-0004tL-Pp for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 08:08:02 -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 1pDPyU-0004Mk-H0 for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 08:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDPyT-0006TN-Vc for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 08:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Jan 2023 13:08:01 +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.167292407524866 (code B ref 60505); Thu, 05 Jan 2023 13:08:01 +0000 Original-Received: (at 60505) by debbugs.gnu.org; 5 Jan 2023 13:07:55 +0000 Original-Received: from localhost ([127.0.0.1]:50499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDPyM-0006T0-Gb for submit@debbugs.gnu.org; Thu, 05 Jan 2023 08:07:54 -0500 Original-Received: from heytings.org ([95.142.160.155]:59938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDPyL-0006Sq-53 for 60505@debbugs.gnu.org; Thu, 05 Jan 2023 08:07:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1672924071; bh=/q05h1wTfAuVFn32O70h+py4plyXeldpfA69S1Ru83Q=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Ro5T6PtxH+PE08HCHF156YJlymGFhs8hMED7LwM6Mgxp5qhUeKM7/EYEEJFcZpyeS Jcw6MKLb7hRYJASma94o84czUX4Hf3lCxDU2gb6qNacm92g1O5gyzwuKnvffvoabae cbmsUuQRPTCixOkZ7W8WNqc3wZtqOgJi8m6NgfCNt6321bDHjvQV7FEA7N7sIKBRCh dsd5JjSZ8K9kOu+Kfm9sRCyyXXTuyc+MhnxDjge1k3BdRD9U1DxRJLT99Dx9nPIlYm SMwxJzJXByaS8FaDSpVroilyPGbKIrqblq8YtlJ2kOfCHp8cvJRZpVzDh7z2aDkB7z wFz68nvWusUUg== In-Reply-To: <87k024918k.fsf@jroy.ca> Content-ID: <8dea9f3e0e1170a34087@heytings.org> 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:252597 Archived-At: --I2NM39P0iC Content-Type: text/plain; charset=us-ascii; format=flowed Content-ID: <8dea9f3e0e758c7dd5a3@heytings.org> > > When I C-x C-f and start typing a TRAMP session to an SSH host, for > instance `/ssh:`, then hit , I see a list of known hosts proposed > for completion. This is the expected behavior. If I then enable > fido-mode and do the same, instead of having known hosts proposed when > hitting , I only get a list of TRAMP methods for completion, eg. > `ssh:`, `sshx:` and `sshfs:`. I would expect to also have known hosts on > fido-mode. > > To reproduce, open emacs -Q; then: > C-x C-f /ssh: > (This produces the expected behavior of proposing known hosts) > M-x fido-mode > C-x C-f /ssh: > (Now, only TRAMP methods are proposed for completion) > There are two problems here: 1. fido-mode sets completion-styles to 'flex', and as indicated in the docstring of completion-styles "Tramp host name completion (e.g., "/ssh:ho") currently doesn't work if this list doesn't contain at least one of `basic', `emacs22' or `emacs21'." The workaround is to add this to your init file: (advice-add #'icomplete--fido-mode-setup :after (lambda () (setq completion-styles '(flex basic)))) You could also ask for that change to be made in core. 2. Doing that is not enough, because of an incompatibility between Tramp and the 'flex' and 'substring' mechanisms. The Tramp manual has a footnote which mentions that incompatibility: "Some completion styles, like `substring' or `flex', require to type at least one character after the trailing `:'." A one-line patch to fix it was proposed, but rejected, a year and a half ago. It is attached to this email, and you can use it locally. As I said in the bug thread in which that patch was proposed: "I expect other bug reports from confused users". --I2NM39P0iC Content-Type: text/x-diff; name=Improve-handling-of-non-default-completion-styles-wi.patch; charset=us-ascii Content-Transfer-Encoding: base64 Content-ID: <8dea9f3e0e7444976f49@heytings.org> Content-Disposition: attachment; filename=Improve-handling-of-non-default-completion-styles-wi.patch RnJvbSA1ZjRiODIxYmJmNTEyMzQyMmQ0Mzg5NWJlZTRjODQ3Y2ZhZGYzMWIw IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQ0KRnJvbTogR3JlZ29yeSBIZXl0 aW5ncyA8Z3JlZ29yeUBoZXl0aW5ncy5vcmc+DQpEYXRlOiBNb24sIDYgU2Vw IDIwMjEgMjA6NTI6MjEgKzAwMDANClN1YmplY3Q6IFtQQVRDSF0gSW1wcm92 ZSBoYW5kbGluZyBvZiBub24tZGVmYXVsdCBjb21wbGV0aW9uIHN0eWxlcyB3 aXRoIFRyYW1wDQogbWV0aG9kcw0KDQoqIGxpc3AvbmV0L3RyYW1wLmVsICh0 cmFtcC1jb21wbGV0aW9uLWhhbmRsZS1maWxlLW5hbWUtYWxsLWNvbXBsZXRp b25zKToNCkRvIG5vdCByZXR1cm4gbWV0aG9kcyB3aGVuIHRoZSBmaWxlbmFt ZSBhbHJlYWR5IGNvbnRhaW5zIGEgY29tcGxldGUgbWV0aG9kLg0KRml4ZXMg YnVnIzUwMzg3Lg0KLS0tDQogbGlzcC9uZXQvdHJhbXAuZWwgfCA1ICsrKy0t DQogMSBmaWxlIGNoYW5nZWQsIDMgaW5zZXJ0aW9ucygrKSwgMiBkZWxldGlv bnMoLSkNCg0KZGlmZiAtLWdpdCBhL2xpc3AvbmV0L3RyYW1wLmVsIGIvbGlz cC9uZXQvdHJhbXAuZWwNCmluZGV4IDRmZDdhMzIyZDQuLjI1OWZjMWZjZmMg MTAwNjQ0DQotLS0gYS9saXNwL25ldC90cmFtcC5lbA0KKysrIGIvbGlzcC9u ZXQvdHJhbX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