unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Tramp and file-name-handler-alist
@ 2002-10-09 12:34 Michael Albinus
  2002-10-24  9:20 ` Michael Sperber [Mr.  Preprocessor]
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Albinus @ 2002-10-09 12:34 UTC (permalink / raw)
  Cc: Tramp Developers, Michael Sperber

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-10-27 10:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-09 12:34 Tramp and file-name-handler-alist Michael Albinus
2002-10-24  9:20 ` Michael Sperber [Mr.  Preprocessor]
2002-10-27 10:46   ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).