From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: tramp (2.0.51); tramp and file-name-all-completions Date: Sun, 16 Oct 2005 21:56:39 +0200 Message-ID: <87zmp944nc.fsf@gmx.de> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1129492666 29234 80.91.229.2 (16 Oct 2005 19:57:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 16 Oct 2005 19:57:46 +0000 (UTC) Cc: tramp-devel@gnu.org, emacs-devel@gnu.org, "Kim F. Storm" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 16 21:57:43 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EREcw-0007O3-6y for ged-emacs-devel@m.gmane.org; Sun, 16 Oct 2005 21:57:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EREcv-0007aq-NO for ged-emacs-devel@m.gmane.org; Sun, 16 Oct 2005 15:57:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EREcb-0007OR-Dr for emacs-devel@gnu.org; Sun, 16 Oct 2005 15:56:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EREca-0007Ni-Es for emacs-devel@gnu.org; Sun, 16 Oct 2005 15:56:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EREca-0007NZ-AB for emacs-devel@gnu.org; Sun, 16 Oct 2005 15:56:40 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1EREca-0004Kg-9n for emacs-devel@gnu.org; Sun, 16 Oct 2005 15:56:40 -0400 Original-Received: (qmail invoked by alias); 16 Oct 2005 19:56:39 -0000 Original-Received: from p54BDB2B1.dip0.t-ipconnect.de (EHLO localhost.local) [84.189.178.177] by mail.gmx.net (mp031) with SMTP; 16 Oct 2005 21:56:39 +0200 X-Authenticated: #3708877 Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Sun, 16 Oct 2005 13:36:47 -0400") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:44145 Archived-At: "Richard M. Stallman" writes: > I would say these problems are all bugs in tramp. Yes. > file-name-all-completions has a simple spec, > and in principle it ought to work "right" for all meaningful args. The problem is the syntactical ambiguity of Tramp file names. (file-name-all-completions "" "/telnet:") can mean completion of user and host names for method "telnet", or completion of file names for method "ssh" on host "telnet". When I wrote completion code for Tramp 3 years ago, I've introduced a somehow obscure heuristic determining what is meant. This works more or less the usual cases, but it breaks ido. I've dropped a comment in the TODO "must be changed when we know it better". It seems to be the time now. > If there are some cases where it is just hopeless to ask tramp > to do completion correctly, we could decide on some return value > that means "unable to do the job right". I don't think so. It is not a tragedy when file-name-all-completions does not return the most complete list. Given the example above, something like ("telnet:127.0.0.1:" "telnet:localhost.local:") would be sufficient, even if there is a host called "telnet". Only when completion of the method returns nil, one might try file name completion. I'm sitting already the whole day on this problem. Best regards, Michael.