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#50387: Possible bug in Tramp or in completions Date: Tue, 07 Sep 2021 16:46:00 +0000 Message-ID: <11c4e3821a544b043840@heytings.org> References: <79cd87e590549c0d916d@heytings.org> <79cd87e590b404a83d08@heytings.org> <8735qi3yn0.fsf@gmx.de> <75d560562c0ab9fd3910@heytings.org> <87r1e1ej2y.fsf@gmx.de> <75d560562c20d8f71e17@heytings.org> <87h7exeh56.fsf@gmx.de> <75d560562c1f93d6a0f7@heytings.org> <877dftebod.fsf@gmx.de> <75d560562c385dda28c0@heytings.org> <87y289cuos.fsf@gmx.de> <75d560562c15a7c4aab4@heytings.org> <87eea0czkx.fsf@gmx.de> <11c4e3821a86a11e0b8f@heytings.org> <11c4e3821ab7d19109fb@heytings.org> <87a6kocvn7.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="31371"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , 50387@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 07 18:47:35 2021 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 1mNeFw-0007oC-BX for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Sep 2021 18:47:32 +0200 Original-Received: from localhost ([::1]:41746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNeFu-000700-8V for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Sep 2021 12:47:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNeFS-0006xW-7M for bug-gnu-emacs@gnu.org; Tue, 07 Sep 2021 12:47:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45966) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNeFS-0006zL-0C for bug-gnu-emacs@gnu.org; Tue, 07 Sep 2021 12:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNeFR-0000o1-SM for bug-gnu-emacs@gnu.org; Tue, 07 Sep 2021 12:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Sep 2021 16:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50387 X-GNU-PR-Package: emacs Original-Received: via spool by 50387-submit@debbugs.gnu.org id=B50387.16310331683012 (code B ref 50387); Tue, 07 Sep 2021 16:47:01 +0000 Original-Received: (at 50387) by debbugs.gnu.org; 7 Sep 2021 16:46:08 +0000 Original-Received: from localhost ([127.0.0.1]:57512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNeEZ-0000mV-Gw for submit@debbugs.gnu.org; Tue, 07 Sep 2021 12:46:08 -0400 Original-Received: from heytings.org ([95.142.160.155]:50922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNeEU-0000lr-8D for 50387@debbugs.gnu.org; Tue, 07 Sep 2021 12:46:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1631033161; bh=76tO5LCrSyUad1jyNxP3RfAK7gP5W5qYkUPMilB4tug=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=s+ocWatORkBt6LlqztQpWc+TUXRtfRrJ/9yOsxsNhzI7Ia8g/1NeKjngj53EP7Z41 98Y2Jqt7yGy4uMAPwkZj+Hl4X6SbPIWqi7PECSIUEYuq/rF6LdXy/7Xwcbqk/3o/kU /kuqUtqKnYclObyK7IaCl3RcRhXT6IVeFxr6COIUv+oxr+7ryRHIPWTvA/CAaUH3w5 EsPla5yRWARtlPEPiOWrFcSssFdnCJHM/3OvtiYPIBpJkkOR+J0j8fTt20V38PH+8A bUcjKFMtmJOnDDr1dglAmC7rxqEJv5mMxxVKyJFGAkJANEvorucZxN5vH96hoq1a2H AGVD0XwsCwZYw== In-Reply-To: <87a6kocvn7.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" Xref: news.gmane.io gmane.emacs.bugs:213712 Archived-At: > > When I type "C-x C-f /scp: TAB", I see the same result as you, "pscp:" > and "scp:". However, the buffer *trace-output* contains > > ====================================================================== > 1 -> (tramp-completion-handle-file-name-all-completions "" "/") > 1 <- tramp-completion-handle-file-name-all-completions: ("sudoedit:" "sshfs:" "smb:" "rcp:" "remcp:" "scp:" "scpx:" "rsync:" "rsh:" "remsh:" "ssh:" "sshx:" "telnet:" "nc:" "su:" "sg:" "sudo:" "doas:" "ksu:" "krlogin:" "plink:" "plinkx:" "pscp:" "psftp:" "fcp:" "rclone:" "afp:" "dav:" "davs:" "gdrive:" "mtp:" "nextcloud:" "sftp:" "ftp:" "adb:") > ====================================================================== > 1 -> (tramp-completion-handle-file-name-all-completions "" "/") > 1 <- tramp-completion-handle-file-name-all-completions: ("sudoedit:" "sshfs:" "smb:" "rcp:" "remcp:" "scp:" "scpx:" "rsync:" "rsh:" "remsh:" "ssh:" "sshx:" "telnet:" "nc:" "su:" "sg:" "sudo:" "doas:" "ksu:" "krlogin:" "plink:" "plinkx:" "pscp:" "psftp:" "fcp:" "rclone:" "afp:" "dav:" "davs:" "gdrive:" "mtp:" "nextcloud:" "sftp:" "ftp:" "adb:") > > That means, "scp:" hasn't been passed to > tramp-completion-handle-file-name-all-completions, and the result of > that function looks proper to me. > Yet it isn't. By the way, before your attempt to fix the problem, you would have seen: 1 -> (tramp-completion-handle-file-name-all-completions "" "/") 1 <- tramp-completion-handle-file-name-all-completions: ("scp:" "scpx:") IOW, one side effect of your patch is that C-x C-f / TAB now displays all Tramp methods. And you said in your reply to Stefan: "For a completion of "/" Tramp tries to be silent, in order not to surprise the many users which don't use Tramp with candidates like "/adb:". They wouldn't know what's that." I fully agree with that, and the problem is that Tramp tried to be "too smart" here, and to display completions that correspond to tramp-default-method, which confuses completion mechanisms. IOW again: - before your attempt to fix the problem, C-x C-f / TAB only displayed "scp:" and "scpx:" among the completion candidates (or e.g. "ssh:", "sshfs:" and "sshx:" with tramp-default-method set to "ssh"); - now C-x C-f / TAB displays all Tramp methods; - with my patch, which actually fixes the bug, C-x C-f / TAB does not display any Tramp method, as it should.