From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.devel,gmane.emacs.tramp Subject: Avoid efficiency issues with user/host name completion in Tramp Date: Sat, 14 Sep 2002 00:04:18 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031954780 5040 127.0.0.1 (13 Sep 2002 22:06:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 13 Sep 2002 22:06:20 +0000 (UTC) Cc: Michael.Albinus@alcatel.de, Tramp Developers Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17pyZu-0001J9-00 for ; Sat, 14 Sep 2002 00:06:18 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17pzBy-0001Z5-00 for ; Sat, 14 Sep 2002 00:45:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17pya5-0001RG-00; Fri, 13 Sep 2002 18:06:29 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17pyY8-0001Lm-00 for emacs-devel@gnu.org; Fri, 13 Sep 2002 18:04:28 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17pyY6-0001La-00 for emacs-devel@gnu.org; Fri, 13 Sep 2002 18:04:27 -0400 Original-Received: from waldorf.cs.uni-dortmund.de ([129.217.4.42]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17pyY5-0001L3-00; Fri, 13 Sep 2002 18:04:25 -0400 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id g8DM4O812129; Sat, 14 Sep 2002 00:04:24 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id AAA14271; Sat, 14 Sep 2002 00:04:18 +0200 (MET DST) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id 83FCD3AFEA; Sat, 14 Sep 2002 00:04:18 +0200 (CEST) Original-To: emacs-devel@gnu.org Original-Lines: 59 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7891 gmane.emacs.tramp:682 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7891 Michael is working on user/host name completion in Tramp. As you might recall, Tramp allows filenames of the form /method:user@host:file If you type that in and hit TAB during entering the host name, then it's clear what Tramp has to do: complete a host name. But you might also want to type filenames without the method, and possibly also without the user name. So the filenames look like this: /host:file At this spot, typing TAB during entering the host name suffers from a problem. Suppose the user types /fo and then TAB: (1) Getting completions for host names might take long, and (2) the user might have intended a local file like /foo/bar. Why might it take long to get completions for host names? Because Tramp will read files with host names in them (like /etc/hosts and /etc/ssh/known_hosts), and some sites have really long such files. (Michael's site is one of them.) There are a number of possible approaches, but I don't know what is the right one? (a) Live with TAB taking a long time in such cases. (And Tramp caches the list of host names in memory, so it's only slow once.) (b) The list of files to read host names from is configurable. Users are responsible for deleteting from the list the files that are too long. Maybe the default list of files could consist of short files only. (c) Don't allow host name completion for these kinds of filenames, require the users to type in the method name if they want host name completion, so that "/ssh:ho" is completed to "/ssh:host:". (Or maybe the user name, so that "/user@ho" is completed to "/user@host:".) (d) Change the filename syntax so that it's possible to recognize even Tramp files where only part of the host name is given. This, of course, breaks the Ange-FTP/Tramp unified filename syntax. (Or at least it breaks backward compatiblity with Ange-FTP in this regard.) (e) Require the user to type ":" at the end of the filename before invoking completion. So the user types "/ho:" and then hits TAB and the system completes to "/host:". This is a funny kind of completion and different from the rest of Emacs. But with partial-completion-mode it could make some kind of sense. Opinions? kai -- ~/.signature is: umop 3p!sdn (Frank Nobis)