On 12 Sep 2000, Henrik Holm wrote:
> currently, tramp-dissect-file-name calls
>
> (make-tramp-file name
> :multi-method nil
> :method method
> :user (or (match-string (nth 2 tramp-file-name-structure) name)
> (user-login-name))
> :host (match-string (nth 3 tramp-file-name-structure) name)
> :path (match-string (nth 4 tramp-file-name-structure) name))
>
> (btw. where is this function defined? is it an alias for
> tramp-make-tramp-file-name?)
It's a result of the defstruct, which see.
> thus, it currently returns the result of evaluating
> (user-login-name). I guess this is still the right thing to do
> if `method' isn't one of "scp1", "scp2", "scp", "sm", "su",
> "rsync", or "scpx".
>
> (as far as I can see from the manual, these are the methods that
> utilize s\(sh\|cp\). right?),
>
> but if method really is one of the ones I mention above, then
> tramp-dissect-file-name could return nil for the user name.
I think it is better not to check against the method names -- users
may wish to install their own methods.
My suggestion would be to allow a nil user name for all connection
methods, and the functions which require a user name just say (or user
(user-login-name)) when user is needed, just like
tramp-dissect-file-name does now.
> It might be necessary to change several functions here... and the
> best way of accomplishing this, if I am able to do it, is
> probably to submit a "patch".
Yes, please :-)
> how can I do this? I am currently using RCS/VC from Emacs -- I
> guess the Right Thing would be to get the CVS version of TRAMP, and
> I guess that VC works mainly the same way with CVS as with RCS? (I
> know very little about CVS. but again, I'm willing to learn!)
See the node `Obtaining Tramp' in the info file for details on using
CVS. It's not hard at all. After the first checkout, just go to the
Tramp directory and say "cvs update -d" to fetch the most recent
version.
> are there VC functions that can generate the patch for me?
Not sure, but you can just go to the top-level directory (the one with
the CONTRIBUTORS file) and say "cvs diff -u".
kai
--
I like BOTH kinds of music.