[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tramp with sshfs
Re: Tramp with sshfs
Wed, 18 Aug 2010 21:13:56 +0200
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
Mihai Lutescu <address@hidden> writes:
> That's exactly what I did the last weekend.
> I crafted a toy tramp method that I called `ext', because it relays on
> an 'external' mount method for most operations that deal with files.
> That may be sshfs or whatever else.
> My feeling is, that method is much faster then scp or other tramp method
> that I tried.
Sounds promising. Have you profiled your settings, in order to have
numbers for comparision? Lets say "ssh" vs "sftp(gvfs)" vs "ext(sshfs)".
> My implementation mounts sillently a directory "/tmp/address@hidden" to the
> remote path "/ext:address@hidden:/". That mapping is hardcoded right now,
> but it's trivial to change it.
I see the trick. However, you assume, that the user is capable to mount
at "/". Many users might miss such rights.
And, secondly, it won't work for XEmacs. There is another file name
syntax for remote files; you would need to mount at "/[ext/address@hidden/" -
that's really ugly.
A more general approach is what tramp-gvfs.el uses. It lets GVFS mount
the remote directory at "~/.gvfs/WebDAV on remote.host" (example), and
uses functions to map between this internal names, and Tramp's file names.
Something like this could be used for sshfs as well.
> The only problem that I found after a few days of using it is the
> expansion of "~" in remote paths like "/ext:address@hidden:~/". That would
> not too be to difficult to fix too, but requires to think about how to
> map home directories to '/ext:' paths, which I was to lazy to. For now
> using a '~' will map to your local home directory.
There are also more problems. What do you do with symlinks? I haven't
tried, but does your implementation of start-file-process works on
remote hosts? You also map the arguments of process calls - this might
be dangerous. Tramp avoids this for good reasons, and let the caller do
the right thing (the best guess is to use relative file names as argument).
> Find bellow the 'tramp-ext.el' method.
> If you want to try that stuff, don't forget to modify mine
> `tramp-login-program'. (I use to use an expect script to launch
> external processes)
This might be a problem as well. It expects from the user an own login
script - in my experience, users appreciate a complete solution. This
part shall be offered in your package as well.
> I'm interested in your feedback. If there is interest I could
> volonteer to maintain it.
I'm happy for every volunteer. But please keep in mind, that Tramp is
copyrighted by the FSF. This requires for every contributor of
non-trivial changes to sign the legal papers of the FSF. Would you be
willing to do so?
> Best regards,
> Mihai Luţescu
Best regards, Michael.