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, 23 Nov 2011 09:04:19 -0500 Message-ID: References: <87ty5yu6or.fsf@gmx.de> <8739df3ix4.fsf@gmx.de> <87r50z1gqj.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1322057097 28987 80.91.229.12 (23 Nov 2011 14:04:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 23 Nov 2011 14:04:57 +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 Nov 23 15:04:51 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 1RTDRS-0004VD-Vi for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Nov 2011 15:04:51 +0100 Original-Received: from localhost ([::1]:35686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTDRS-0006A6-Fn for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Nov 2011 09:04:50 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:57330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTDRK-00069g-SY for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2011 09:04:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTDRF-0006uj-3p for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2011 09:04:42 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTDRE-0006uc-Nm for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2011 09:04:36 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RTDSb-0005AY-Oe for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2011 09:06:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Nov 2011 14:06: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.132205714919849 (code B ref 10085); Wed, 23 Nov 2011 14:06:01 +0000 Original-Received: (at 10085) by debbugs.gnu.org; 23 Nov 2011 14:05:49 +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 1RTDSP-0005A6-J6 for submit@debbugs.gnu.org; Wed, 23 Nov 2011 09:05:49 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RTDSM-00059x-Dm for 10085@debbugs.gnu.org; Wed, 23 Nov 2011 09:05:47 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhEFAJP8zE5FxIbt/2dsb2JhbABEqECCKoEGgXIBAQQBViMFCws0EhQYDSSIGLQximIEiCCaAoRO X-IronPort-AV: E=Sophos;i="4.69,559,1315195200"; d="scan'208";a="149150212" Original-Received: from 69-196-134-237.dsl.teksavvy.com (HELO pastel.home) ([69.196.134.237]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Nov 2011 09:04:19 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 906D458E47; Wed, 23 Nov 2011 09:04:19 -0500 (EST) In-Reply-To: <87r50z1gqj.fsf@gmx.de> (Michael Albinus's message of "Wed, 23 Nov 2011 07:43:16 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 23 Nov 2011 09:06:01 -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:54213 Archived-At: >>> `expand-file-name' seems to access the remote host. This can be >>> suppressed by let-binding of `non-essential' to t. >> I think adding non-essential to rfn-eshadow.el would be even more >> correct (but it doesn't fix the underlying problem). > Shall I submit such a patch towards rfn-eshadow.el, for the sake of the > upcoming release? You can even install it now. > Honestly, I do not understand in detail the "underlying problem". Simple completion tables have (all-completions STRING TABLE) return a list whose elements all have STRING as a prefix. More complex completion tables such as file-name completion instead return a list whose elements have only a suffix of STRING as a prefix. Until Emacs-23, completion tables could do this without telling anyone, which restricted the kind of completion styles that could be implemented (e.g. partial-completion-mode provided partial-completion for files in an ad-hoc way, whereas Emacs-23 provides partial-completion for files without using file-specific knowledge). Emacs-23 solved this issue by adding a new method to completion tables, called completion-boundaries which lets the completion table announce which part of STRING will be the prefix of the all-completions result. So, completion of "/foo/bar" is divided into fields "foo" and "bar" with "/" as separators, and (completion-boundaries "/foo/bar") returns 5 to indicate that "/foo/" will be stripped from all-completions's output, leaving only "bar" as a prefix of all returned elements. As I have shown with the trace, Tramp treats "/sud:" and "/sudo:" differently, making the ":" a boundary separator in the first case but not in the second. It's not strictly incorrect, but it is inconsistent and makes it harder for the minibuffer.el code to behave well. > 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. Stefan