help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using tramp to connect to a remote emacs session


From: Benjamin Andresen
Subject: Re: Using tramp to connect to a remote emacs session
Date: Thu, 03 Sep 2009 19:50:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

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

> * How can I use TRAMP to connect to a remote GNU Emacs session?
>
>   You can configure Emacs Client doing this.  On the remote host,
>   you start the Emacs Server:
>
>        (require 'server)
>        (setq server-host (system-name)
>              server-use-tcp t)
>        (server-start)
>
>   Make sure, that the result of `(system-name)' can be resolved on
>   your local host; otherwise you might use a hard coded IP address.
>
>   The resulting file `~/.emacs.d/server/server' must be copied to
>   your local host, at the same location.  You can call then the
>   Emacs Client from the command line:
>
>        emacsclient /ssh:user@host:/file/to/edit
>
>   `user' and `host' shall be related to your local host.

I don't quite get this. As I understand it the following happens:

Remote Emacs (R) has emacs running with the above server settings.
Local emacs (L) will copy the ~R/.emacs.d/server/server to
~L/.emacs.d/server/server

and then launch emacsclient -f server /ssh:user@L:/etc/localfile

But to do any editing, you still need to be at R (i.e. attached scree)
to see the /etc/localfile being opened. All the emacsclient line will do
is instruct R to open that file. After wards you then press C-x # on R to
close that connection.
(All L sees is "Waiting for Emacs..." until that happens.)

Why not ssh into R and just C-x C-f /ssh:user@L:/etc/localfile without
copying anything?

Therefor I don't see what you gain. You still need R to be able to
connect via ssh to L, which means it might possibly go trough a NAT.

What am I missing?

TIA,
benny


reply via email to

[Prev in Thread] Current Thread [Next in Thread]