[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tramp and file-name-handler-alist

From: Michael Albinus
Subject: Re: Tramp and file-name-handler-alist
Date: 27 Oct 2002 11:46:03 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

address@hidden (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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]