From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel,gmane.emacs.tramp Subject: Re: Tramp and file-name-handler-alist Date: 27 Oct 2002 11:46:03 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: References: Reply-To: Michael Albinus NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035715666 3970 80.91.224.249 (27 Oct 2002 10:47:46 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 27 Oct 2002 10:47:46 +0000 (UTC) Cc: emacs-devel@gnu.org, 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 185kxM-00011n-00 for ; Sun, 27 Oct 2002 11:47:44 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 185l0y-0005k3-00 for ; Sun, 27 Oct 2002 11:51:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 185kx8-0006en-00; Sun, 27 Oct 2002 05:47:30 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 185kw5-0004NT-00 for emacs-devel@gnu.org; Sun, 27 Oct 2002 05:46:25 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 185kvz-0004N0-00 for emacs-devel@gnu.org; Sun, 27 Oct 2002 05:46:24 -0500 Original-Received: from mailrelay2.alcatel.de ([194.113.59.71] helo=mailrelay1.alcatel.de) by monty-python.gnu.org with esmtp (Exim 4.10) id 185kvv-0004C6-00; Sun, 27 Oct 2002 05:46:15 -0500 Original-Received: from slbh00.bln.sel.alcatel.de (slbh00.bln.sel.alcatel.de [149.204.49.8]) by mailrelay1.alcatel.de (8.9.3/8.9.3) with ESMTP id LAA20095; Sun, 27 Oct 2002 11:46:07 +0100 (MET) Original-Received: from slbwba.bln.sel.alcatel.de (albinus@slbwba [149.204.93.83]) by slbh00.bln.sel.alcatel.de (8.9.3/8.9.3) with ESMTP id LAA03838; Sun, 27 Oct 2002 11:46:05 +0100 (MET) Original-To: sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor]) Original-Lines: 35 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 X-Alcanet-MTA-scanned-and-authorized: yes X-Alcanet-MTA-scanned-and-authorized: yes X-Alcanet-MTA-scanned-and-authorized: yes 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:8832 gmane.emacs.tramp:865 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8832 sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor]) writes: > I've always argued for putting a meta-mechanism on top of > Tramp/EFS/ange-ftp, which would have a compositional way of specifying > how file-name handlers are assembled, and which includes a way of > using predicates in the manner described. In fact the latest changes in Tramp go this way. All code integrating ange-ftp has been moved to tramp-ftp.el. Once tramp-file-name-handler has been chosen by find-file-name-handler, it calls tramp-ftp-file-name-p in order to find out whether ange-ftp has to be used, and hands over control in case of. By this, the tight folding of ange-ftp into Tramp has been reduced to a small interface, which could be applied for EFS as well. A more general approach would take something similar to file-name-handler-alist for Tramp internal use as well. Instead of declaring a regexp for decision, there might be a function (with filename as parameter). Something like this: ((tramp-ftp-file-name-p . tramp-ftp-file-name-handler) (tramp-smb-file-name-p . tramp-smb-file-name-handler)) At the beginning of tramp-file-name-handler this list is parsed, and the respective handler is called. tramp-ftp-file-name-handler would be a wrapping function, which calls either ange-ftp-hook-function or efs-file-handler-function. tramp-smb-file-name-handler is under development for accessing SMB servers (SAMBA, or M$ operating systems). Best regards, Michael. PS: I guess we can shorten the distribution list of this thread to tramp-devel. The major issues of integrating into Emacs seem to be clear.