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: Tue, 22 Nov 2011 22:55:25 +0100 Message-ID: <877h2r3jqq.fsf@gmx.de> References: <87ty5yu6or.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1321998951 16573 80.91.229.12 (22 Nov 2011 21:55:51 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 22 Nov 2011 21:55:51 +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 Tue Nov 22 22:55:46 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RSyJe-0004Rw-JT for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Nov 2011 22:55:46 +0100 Original-Received: from localhost ([::1]:49940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSyJe-0001in-6S for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Nov 2011 16:55:46 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:35529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSyJa-0001iX-LR for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2011 16:55:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSyJZ-0003Ol-Fi for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2011 16:55:42 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSyJZ-0003Of-Cw for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2011 16:55:41 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RSyKs-000690-D3 for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2011 16:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Nov 2011 21:57: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.132199901523604 (code B ref 10085); Tue, 22 Nov 2011 21:57:02 +0000 Original-Received: (at 10085) by debbugs.gnu.org; 22 Nov 2011 21:56:55 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RSyKj-00068b-HM for submit@debbugs.gnu.org; Tue, 22 Nov 2011 16:56:55 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.22]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1RSyKh-00068Q-8L for 10085@debbugs.gnu.org; Tue, 22 Nov 2011 16:56:52 -0500 Original-Received: (qmail invoked by alias); 22 Nov 2011 21:55:27 -0000 Original-Received: from p57BB96F0.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.150.240] by mail.gmx.net (mp072) with SMTP; 22 Nov 2011 22:55:27 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX183kVVQusU3mexwFii7+Lk0cMjnaxdSKhSafOTwtD AtvFhdtVGeW+dH In-Reply-To: (Stefan Monnier's message of "Tue, 22 Nov 2011 14:05:42 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 22 Nov 2011 16:57:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:54182 Archived-At: Stefan Monnier writes: >> Start "emacs -Q". Apply "C-x C-f /sudo:: TAB". This results in >> "/sudo:sudo:root@". A correct expansion would be "/sudo:root@". > >> As far as I can see, Tramp's completion functions work properly. >> The problem seems to be `completion-pcm--find-all-completions'. > I think the patch below fixes it. Yes, it does. > The problem is that PCM assumes that > a field separator cannot appear within a field. In "/sudo::" the first > / is a field separator, and the last ":" is also a field separator, but > the first ":" isn't. Unfortunately, I don't know anything about the completion machinery in minibuffer.el. Maybe I should learn about. Is there documentation which explains the concept of completion-table? And is there something Tramp could do? It shall know the boundaries, and it could provide such information more precisely. > If you do "C-x C-f /sudo ?" you get "/sudo:" but if you > do "C-x C-f /sudo: ?" you get "sudo:root@". So fundamentally, the : of > "/sudo:" acts a field separator, so (completion-boundaries "/sudo:") should > probably return (6 . 0) rather than (1 . 0), and then "C-x C-f /sudo: ?" > should list '("root@" ":") rather than '("sudo:root@"). > > Related inconsistency from a trace of C-x C-f /sud: TAB: > 1 -> completion-file-name-table: string="/sud:" pred=file-exists-p action=(boundaries . "") > 1 <- completion-file-name-table: (boundaries 5) > [...] > ====================================================================== > 1 -> completion-file-name-table: string="/sudo:" pred=file-exists-p action=(boundaries . "") > 1 <- completion-file-name-table: (boundaries 1) I'ld like to check it if I could understand what's behind. > Stefan Best regards, Michael.