From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.tramp,gmane.emacs.devel Subject: Tramp and file-name-handler-alist Date: 09 Oct 2002 14:34:14 +0200 Sender: tramp-devel-admin@mail.freesoftware.fsf.org Message-ID: Reply-To: Michael Albinus NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1034167133 5243 127.0.0.1 (9 Oct 2002 12:38:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 9 Oct 2002 12:38:53 +0000 (UTC) Cc: Tramp Developers , Michael Sperber Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17zG72-0001MR-00 for ; Wed, 09 Oct 2002 14:38:52 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17zGv4-0007CD-00 for ; Wed, 09 Oct 2002 15:30:35 +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 17zG3b-00052U-00; Wed, 09 Oct 2002 08:35:19 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17zG2g-00042W-00 for tramp-devel@mail.freesoftware.fsf.org; Wed, 09 Oct 2002 08:34:22 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17zG2d-0003yA-00 for tramp-devel@mail.freesoftware.fsf.org; Wed, 09 Oct 2002 08:34:21 -0400 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 17zG2d-0003vT-00; Wed, 09 Oct 2002 08:34:19 -0400 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 OAA21823; Wed, 9 Oct 2002 14:34:16 +0200 (MET DST) 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 OAA15622; Wed, 9 Oct 2002 14:34:15 +0200 (MET DST) Original-To: emacs-devel@gnu.org Original-Lines: 42 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 Errors-To: tramp-devel-admin@mail.freesoftware.fsf.org X-BeenThere: tramp-devel@mail.freesoftware.fsf.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.tramp:786 gmane.emacs.devel:8479 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8479 Hello, Tramp uses its own file name syntax for getting control over file i/o primitives, using a regexp in file-name-handler-alist. Unfortunately this has the disadvantage, that Tramp must handle all file names with that syntax, even if it isn't responsible for them (like Ange-FTP related files). And more Tramp methods might appear, which won't be handled directly by Tramp but external modules. Distinguishing Tramp file names by syntactical means, depending on method name, doesn't work because Tramp applies a default method if none is given. So it would be desirable to have a more general possibility deciding a file-name-handler. Perfect would be an extension to file-name-handler-alist, which doesn't allow a regexp only but also a function for decision. Something like ; forward to Ange-FTP or EFS ((tramp-ftp-file-name-p . tramp-ftp-file-name-handler) ; the rest of the pack (tramp-file-name-p . tramp-file-name-handler) ("\\`/:" . file-name-non-special)) For backward compatibility reasons, this wouldn't be a short term solution. With the current interface, I see 2 possible approaches: - Do it within tramp-file-name-handler. The filename is analyzed, and then the respective handler for a method is launched. This handler calls the respective primitive functions related to the method. The disadvantage is, that tramp-file-name-handler is called with different paramter lists for the primitives, and sometimes even the filename isn't part of. - Replace find-file-name-handler by an own implementation. In case of Tramp file names it returns the handler related to actual method, otherwise it calls the original find-file-name-handler. Are there other possibilities to solve the problem? And which approach is to prefer? Best regards, Michael.