From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#10085: 24.0.91; completion-pcm--find-all-completions returns wrong remote file names Date: Wed, 27 Apr 2016 10:16:30 -0400 Message-ID: References: <87ty5yu6or.fsf@gmx.de> <8739df3ix4.fsf@gmx.de> <87r50z1gqj.fsf@gmx.de> <87k46qwpl2.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1461766650 14979 80.91.229.3 (27 Apr 2016 14:17:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2016 14:17:30 +0000 (UTC) Cc: 10085@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 27 16:17:19 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1avQHA-0003wp-0h for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 16:17:12 +0200 Original-Received: from localhost ([::1]:43470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avQH9-0008OS-DF for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 10:17:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avQH5-0008Mf-Sq for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 10:17:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avQH0-00018m-60 for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 10:17:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37822) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avQH0-00018V-2a for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 10:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1avQGz-0003QL-Um for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 10:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Apr 2016 14:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10085 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10085-submit@debbugs.gnu.org id=B10085.146176656613079 (code B ref 10085); Wed, 27 Apr 2016 14:17:01 +0000 Original-Received: (at 10085) by debbugs.gnu.org; 27 Apr 2016 14:16:06 +0000 Original-Received: from localhost ([127.0.0.1]:50159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avQG6-0003Ot-5F for submit@debbugs.gnu.org; Wed, 27 Apr 2016 10:16:06 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:58071) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avQG4-0003Ol-Pu for 10085@debbugs.gnu.org; Wed, 27 Apr 2016 10:16:05 -0400 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id u3REG31a023848; Wed, 27 Apr 2016 10:16:03 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 03A77661ED; Wed, 27 Apr 2016 10:16:30 -0400 (EDT) In-Reply-To: <87k46qwpl2.fsf@gmx.de> (Michael Albinus's message of "Wed, 23 Nov 2011 21:28:41 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5655=0 X-NAI-Spam-Version: 2.3.0.9418 : core <5655> : inlines <4726> : streams <1626165> : uri <2197832> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116912 Archived-At: > Tramp does not know of programmed completion and pcm style completion; > all what it knows is file-name-all-completions. > What else could Tramp do? Tramp has control via file-name-directory. >>> I guess we need to find out, what are separators in Tramp wrt >>> completion tables, and how to handle them. >> The user finds out, the implementer decides. > Oh. You haven't seen Tramp's heuristic to determine, whether completion > of "/sudo" means the method or the user or the host (in fact, it is all). ;-) OK, here are some inconsistencies I found just now in emacs-25: ELISP> (completion-boundaries "/sudo:" #'completion-file-name-table nil "") (6 . 0) ELISP> (let ((non-essential t)) (completion-boundaries "/sudo:" #'completion-file-name-table nil "")) (1 . 0) In the above the first answer looks good to me. The second looks wrong: it should be the same as the first. This is controlled by Tramp via (file-name-directory "/sudo:"). ELISP> (all-completions "/sudo:" #'completion-file-name-table) *** Eval error *** Host name must not match method "sudo" ELISP> (let ((non-essential t)) (all-completions "/sudo:" #'completion-file-name-table)) ("sudo:root@") The first answer above looks wrong (there's no reason for Tramp to assume that "/sudo:" uses "sudo" as a host name, and indeed in the second case it correctly interprets "sudo" as a method rather than a host name). Assuming we fix the completion-boundaries to be (6 . 0) the second answer (which comes from `file-name-all-completions "" "/sudo:") should be ("root@"). Fixing those inconsistencies should fix bug#10085. Stefan