From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus 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 20:37:54 +0200 Message-ID: <87k2jiaoe5.fsf@gmx.de> 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 1461782396 28194 80.91.229.3 (27 Apr 2016 18:39:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2016 18:39:56 +0000 (UTC) Cc: 10085@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 27 20:39:45 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 1avUNE-0002ws-MS for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 20:39:44 +0200 Original-Received: from localhost ([::1]:44707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avUNE-0000xR-5S for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 14:39:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avUMd-0008DY-J6 for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 14:39:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avUMY-0002OF-Is for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 14:39:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avUMY-0002O6-Ff for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 14:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1avUMY-0001Q0-AY for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 14:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Apr 2016 18:39:02 +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.14617822875387 (code B ref 10085); Wed, 27 Apr 2016 18:39:02 +0000 Original-Received: (at 10085) by debbugs.gnu.org; 27 Apr 2016 18:38:07 +0000 Original-Received: from localhost ([127.0.0.1]:50514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avULe-0001Op-Rq for submit@debbugs.gnu.org; Wed, 27 Apr 2016 14:38:07 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:61163) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avULd-0001OL-5A for 10085@debbugs.gnu.org; Wed, 27 Apr 2016 14:38:05 -0400 Original-Received: from detlef.gmx.de ([87.146.48.99]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0LbM2k-1bOod42gnq-00kvRy; Wed, 27 Apr 2016 20:37:56 +0200 In-Reply-To: (Stefan Monnier's message of "Wed, 27 Apr 2016 10:16:30 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-Provags-ID: V03:K0:wyR9FNgMnREv4hzqwllIWXxJcBMBne/ep1Vjn6I4V7ZTncp3UoL fbxtOkzpmAeiDPyY8MtZloREupuIz25TcJu3TO2MHp3Nx7TQdPjOKw+tDYLqlobhx1c8kvr KI/Pu+V4+3YuO8o1kgCs36sFBWE50GfV4uxKqePrkoBHf/zz6JGR5Fp36ES1gIVkJTaq60m pWujZ2qgGxD4Ac6H+Cccg== X-UI-Out-Filterresults: notjunk:1;V01:K0:15UmilSBCcg=:VFknj8lcrGTL+0Af/aAVqt nl7u2snMCKbQf2YIdlHuGhbSlwTlS5IRjUauVD+badxdcVqKoCAZdgF+xOpNMxVEExVyvAbA/ zo+gXuUwbpYJguN6zJ5cUo1U2QcTG8oDbtAQ2aJveER9IbwGmI5RdQjAKVI13ETZPakmP43Wq I77V13QACNzNwErjNl1qegxuVlrNtENAObS4S33QRtoCTAXc1JUiAd31owbVD95tDs/8ChIke wBBeCx4tvo4z0c7zqo3+j1rCjFyNqdeqCvJ3RniAxg0A4ibdXbvClbh0f9XUziNGiYrrc74n5 DpF317VrIzWLhNxxMy0qXQq1QYYFc7KpIJdr46YygmqLEbf4q/2SDeG6amBXDfnhjqLSIenIy kp9Q1dUzVAeFExLAhIaNrGZkn3m22qWQ1U8bGJaQxSvo0+2ef53rdsN00+5IDucFP/2kVIjUG 6BXEM0VsUwJ1d4uJR4W6X4HUNOLh/ZLNCyozZ4mV7m8/wNwSXZU3MSsrgCSEPyvaOgvYEXUF3 orKRpDriUu7jrmhglriqHJWet6jrL55RZ0aRwYNNB8Q4ZH30fYF+PIPQS5TOr4IPz9EcnaPR3 zwuAE6vsi8Q/w3/xqasGe+XOOYSeKwvCGxR++sOdVLt4WTJCqBf4HP5wcAuX3U0bhN6eJ+dnC xCcYg9Mndjp9IUSu1LzGXxFGZwDPrnirGnfOuYg6XxZv087g1BoYF4470jhXuRR6alU5IgW4f A4VgP6uy5FzgPC2sIX7lsm7Kx7YQM4kMzMtII6LMWATZNb59pTKjlIxDTDjE2fMVI0jAcKjH 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:116952 Archived-At: Stefan Monnier writes: Hi Stefan, >> 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. > > 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:" > ELISP> #'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:"). That's true, there is a bug: (file-name-directory "/sudo:") => "/sudo:" (let ((non-essential t)) (file-name-directory "/sudo:")) => "/" The second answer is wrong, indeed. I will check what's up. > 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:" > ELISP> #'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). Hmm, "/sudo:" is a valid remote file name. It uses as method the value of `tramp-default-host', and as host the string between "/" and ":". That's how it is specified. How shall Tramp know from the syntactical point of view, that "sudo" is meant as method? It cannot, unless somebody tells it to Tramp, for example by let-binding `non-essential'. > 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. I see. I will check what could be done on Tramp side. Whatever I'll do, it will go into master. (Being busy just now, it might take the weekend to work on this. Sorry.) > Stefan Best regards, Michael.