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: Emacs unconditionally loads tramp.el Date: Fri, 28 Apr 2006 21:58:09 +0200 Message-ID: <87slnxtqum.fsf@gmx.de> References: <87r73n5o5x.fsf@pacem.orebokech.com> <87iroz5g0z.fsf@pacem.orebokech.com> <87u08iyd2r.fsf@gmx.de> <87hd4ewcj0.fsf@gmx.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1146254308 4757 80.91.229.2 (28 Apr 2006 19:58:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Apr 2006 19:58:28 +0000 (UTC) Cc: eliz@gnu.org, romain@orebokech.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 28 21:58:26 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FZZ6f-00017S-2o for ged-emacs-devel@m.gmane.org; Fri, 28 Apr 2006 21:58:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZZ6e-0003Ys-7w for ged-emacs-devel@m.gmane.org; Fri, 28 Apr 2006 15:58:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FZZ6R-0003Xv-CS for emacs-devel@gnu.org; Fri, 28 Apr 2006 15:58:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FZZ6P-0003Vo-Ps for emacs-devel@gnu.org; Fri, 28 Apr 2006 15:58:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FZZ6P-0003Vg-Mm for emacs-devel@gnu.org; Fri, 28 Apr 2006 15:58:09 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1FZZ9b-0003qY-TB for emacs-devel@gnu.org; Fri, 28 Apr 2006 16:01:28 -0400 Original-Received: (qmail invoked by alias); 28 Apr 2006 19:58:07 -0000 Original-Received: from p54BDA59E.dip0.t-ipconnect.de (EHLO localhost.local) [84.189.165.158] by mail.gmx.net (mp042) with SMTP; 28 Apr 2006 21:58:07 +0200 X-Authenticated: #3708877 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Fri, 28 Apr 2006 11:45:16 -0400") User-Agent: Gnus/5.110005 (No Gnus v0.5) 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:53569 Archived-At: Richard Stallman writes: > That's not new, because it's a similar story with Emacs 21 and > `ange-ftp-completion-hook-function'. The only difference is that > Ange-FTP is loaded only for `file-name-completion´, whereas > Tramp is loaded in more cases. > > Why is Tramp loaded in more cases? Can you get rid of them, and > arrange to load it only for file name completion? For GNU Emacs, it should be possible. Commentary from `tramp-completion-file-name-handler-alist´ (I haven't checked further yet): ;; Handlers for partial tramp file names. For GNU Emacs just ;; `file-name-all-completions' is needed. The other ones are necessary ;; for XEmacs. But this problem has reached XEmacs mailing lists as well. I fear a general solution is needed. > Also, maybe it is possible to prevent loading these packages > in the specific case of just `/'. Completion is not very > useful in that case, and that is the most likely case for someone > to type and not really want it. That would be simple: (defconst tramp-completion-file-name-regexp-unified "^/[^/:][^/]*$") A user would need to type at least one additional character after the leading "/" in order to get Tramp loaded. But this still will happen without typing or so, just due to `expand-file-name´. Meanwhile, I doubt whether it is worth the trouble. We could revert the patch, and would fall back to the following scenario: - After starting Emacs, there is no hostname completion for remote file names. - After using the first remote file name, Tramp is loaded, and hostname completion is active. - If a user wants to use hostname completion immediately after starting Emacs, a simple (require 'tramp) in .emacs is sufficient. This must be documented. It seems to be more accepted (see Eli's message on this subject). Shall we go this direction? Best regards, Michael.