all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Tramp with sshfs
@ 2010-08-17  9:42 Andrea Crotti
  2010-08-17 14:33 ` Michael Albinus
  0 siblings, 1 reply; 5+ messages in thread
From: Andrea Crotti @ 2010-08-17  9:42 UTC (permalink / raw)
  To: help-gnu-emacs

I was wondering it it would be possible to use tramp even if I'm
actually using sshfs.

Unfortunately tramp over ssh is a bit too slow (I also have the
controlmaster activated, anything else I can do?), and sshfs is normally
much nicer.

But when I launch a command I would like to get it executed on the
remote machine where the files really are.

How could I cheat this thing somehow?
Thanks,
Andrea




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

* Re: Tramp with sshfs
  2010-08-17  9:42 Tramp with sshfs Andrea Crotti
@ 2010-08-17 14:33 ` Michael Albinus
  2010-08-17 16:47   ` Andrea Crotti
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2010-08-17 14:33 UTC (permalink / raw)
  To: Andrea Crotti; +Cc: help-gnu-emacs, tramp-devel

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> I was wondering it it would be possible to use tramp even if I'm
> actually using sshfs.
>
> Unfortunately tramp over ssh is a bit too slow (I also have the
> controlmaster activated, anything else I can do?), and sshfs is normally
> much nicer.

For large files, scp might be faster. It depends.

> But when I launch a command I would like to get it executed on the
> remote machine where the files really are.
>
> How could I cheat this thing somehow?

Not with the existing Tramp packages. One ould introduce a new method
"sshfs", which works similar as in tramp-gvfs.el: mount the sshfs
"filesystem" on a temporary mount point, and map silently file names
like "/sshfs:host:/path/to/file" to "/mount_point/path/to/file".

Processes on the remote host could be handled similar to the handling
for the "ssh" method.

I will add an entry to Tramp's todo list. Unfortunately, I am short in
time, if there is a volunteer ...

> Thanks,
> Andrea

Best regards, Michael.



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

* Re: Tramp with sshfs
  2010-08-17 14:33 ` Michael Albinus
@ 2010-08-17 16:47   ` Andrea Crotti
  2010-08-17 16:58     ` Andrea Crotti
  0 siblings, 1 reply; 5+ messages in thread
From: Andrea Crotti @ 2010-08-17 16:47 UTC (permalink / raw)
  To: help-gnu-emacs

Michael Albinus <michael.albinus@gmx.de> writes:

> For large files, scp might be faster. It depends.

Some experiments shows that is quite the same, at least for what I've
tried...
>
> Not with the existing Tramp packages. One ould introduce a new method
> "sshfs", which works similar as in tramp-gvfs.el: mount the sshfs
> "filesystem" on a temporary mount point, and map silently file names
> like "/sshfs:host:/path/to/file" to "/mount_point/path/to/file".
>
> Processes on the remote host could be handled similar to the handling
> for the "ssh" method.
>
> I will add an entry to Tramp's todo list. Unfortunately, I am short in
> time, if there is a volunteer ...
>

Ah that's interesting, if you point out where more or less to have a
look it would be nice to try to see if I'm able to.

And also I only found a CVS repository, something distributed would be
better if I want to play with my version.
Is there anything or should I use git-import magic?





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

* Re: Tramp with sshfs
  2010-08-17 16:47   ` Andrea Crotti
@ 2010-08-17 16:58     ` Andrea Crotti
  2010-08-17 19:19       ` Michael Albinus
  0 siblings, 1 reply; 5+ messages in thread
From: Andrea Crotti @ 2010-08-17 16:58 UTC (permalink / raw)
  To: help-gnu-emacs

Andrea Crotti <andrea.crotti.0@gmail.com> writes:
> Ah that's interesting, if you point out where more or less to have a
> look it would be nice to try to see if I'm able to.
>
> And also I only found a CVS repository, something distributed would be
> better if I want to play with my version.
> Is there anything or should I use git-import magic?

To make it even more simple, what if we have a list like
'(('/volumes/arch' . 'arch')...)

of (paths . name_in_ssh_config)

What I would want then is that every time I execute a command it's
executed instead of my local machine on the remote machine.


With some hooks or advising the shell-command could not that work or is
too ugly/not working?




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

* Re: Tramp with sshfs
  2010-08-17 16:58     ` Andrea Crotti
@ 2010-08-17 19:19       ` Michael Albinus
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Albinus @ 2010-08-17 19:19 UTC (permalink / raw)
  To: Andrea Crotti; +Cc: help-gnu-emacs, tramp-devel

[keeping tramp-devel@gnu.org in cc, other people might be interested in]

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

> Andrea Crotti <andrea.crotti.0@gmail.com> writes:
>> Ah that's interesting, if you point out where more or less to have a
>> look it would be nice to try to see if I'm able to.

There are some packages like this. tramp-smb.el, tramp-gvfs.el,
tramp-imap.el. All of them add new methods to Tramp. You could try to
study them.

>> And also I only found a CVS repository, something distributed would be
>> better if I want to play with my version.
>> Is there anything or should I use git-import magic?

Until now, being the only continously working Tramp maintainer, I was
too lazy to move somewhere else but cvs. It is on the "maybe we shall
change it" list. If needed, we could use a different dvcs, like git or
bzr. It depends on what gnu.org supports.

> To make it even more simple, what if we have a list like
> '(('/volumes/arch' . 'arch')...)
>
> of (paths . name_in_ssh_config)
>
> What I would want then is that every time I execute a command it's
> executed instead of my local machine on the remote machine.

Tramp offers own implementations for so called "magic file name
handlers". The idea is, that in `file-name-handler-alist' for every such
a primitive function it is checked, whether there is a file name
handler, depending on the syntax of the file name in question.

You find there an entry like

   ("\\`/\\([^[/:]+\\|[^/]+]\\):" . tramp-file-name-handler)

That means, for file names with Tramp's remote file name syntax, the
Tramp implementation for these magic functions is applied.

See (info "(elisp) Magic File Names") for the list of magic functions.

> With some hooks or advising the shell-command could not that work or is
> too ugly/not working?

One could add another entry to `file-name-handler-alist', like

   (cons (reqexp-quote "/volumes/arch") 'sshfs-file-name-handler)

`sshfs-file-name-handler' would add implementations at least for
`file-remote-p', `process-file', `shell-command', `start-file-process'.
Maybe also for other functions, don't know.

This could be part of Tramp, or a package on its own.

Best regards, Michael.



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

end of thread, other threads:[~2010-08-17 19:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-17  9:42 Tramp with sshfs Andrea Crotti
2010-08-17 14:33 ` Michael Albinus
2010-08-17 16:47   ` Andrea Crotti
2010-08-17 16:58     ` Andrea Crotti
2010-08-17 19:19       ` Michael Albinus

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.