unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Andrea Crotti <andrea.crotti.0@gmail.com>
Cc: help-gnu-emacs@gnu.org, tramp-devel@gnu.org
Subject: Re: Tramp with sshfs
Date: Tue, 17 Aug 2010 21:19:08 +0200	[thread overview]
Message-ID: <87pqxhqc7n.fsf@gmx.de> (raw)
In-Reply-To: <m1aaol41mx.fsf@gmail.com> (Andrea Crotti's message of "Tue, 17 Aug 2010 18:58:30 +0200")

[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.



      reply	other threads:[~2010-08-17 19:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

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=87pqxhqc7n.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=andrea.crotti.0@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=tramp-devel@gnu.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.
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).