unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <Michael.Albinus@alcatel.de>
Cc: Tramp Developers <tramp-devel@mail.freesoftware.fsf.org>,
	Michael Sperber <sperber@informatik.uni-tuebingen.de>
Subject: Tramp and file-name-handler-alist
Date: 09 Oct 2002 14:34:14 +0200	[thread overview]
Message-ID: <nq4rbvlrjt.fsf@alcatel.de> (raw)

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.

             reply	other threads:[~2002-10-09 12:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-09 12:34 Michael Albinus [this message]
2002-10-24  9:20 ` Tramp and file-name-handler-alist Michael Sperber [Mr.  Preprocessor]
2002-10-27 10:46   ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nq4rbvlrjt.fsf@alcatel.de \
    --to=michael.albinus@alcatel.de \
    --cc=sperber@informatik.uni-tuebingen.de \
    --cc=tramp-devel@mail.freesoftware.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).