unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Suvayu Ali <fatkasuvayu+linux@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Using tramp to connect to a remote emacs session
Date: Fri, 04 Sep 2009 04:12:48 -0700	[thread overview]
Message-ID: <4AA0F630.70307@gmail.com> (raw)
In-Reply-To: <87k50f535i.fsf@in-ulm.de>

On Thursday 03 September 2009 10:50 AM, Benjamin Andresen wrote:
> 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?
>
The /etc/localfile is local to R not L. ssh-ing to R would mean either 
X-forwarding or using `emacs -nw'. Whereas this way I get the whole gui 
and since Tramp edits a localfile in /tmp I am independent on any 
network issues until I actually do `C-x C-s' to save my edits.

> 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


-- 
Suvayu

Open source is the future. It sets us free.




      reply	other threads:[~2009-09-04 11:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02 23:06 Using tramp to connect to a remote emacs session Suvayu Ali
2009-09-03  8:02 ` Peter Dyballa
2009-09-03 16:06   ` Suvayu Ali
     [not found]   ` <mailman.5952.1251993987.2239.help-gnu-emacs@gnu.org>
2009-09-03 16:34     ` Anselm Helbig
2009-09-04  3:17       ` Suvayu Ali
     [not found]       ` <mailman.5986.1252034254.2239.help-gnu-emacs@gnu.org>
2009-09-04  3:27         ` Benjamin Andresen
2009-09-04 11:17           ` Suvayu Ali
2009-09-04 11:19           ` Suvayu Ali
2009-09-03 13:08 ` Michael Albinus
2009-09-03 16:01   ` Suvayu Ali
2009-09-04  7:03     ` Michael Albinus
2009-09-04 11:05       ` Suvayu Ali
2009-09-04 11:37         ` Michael Albinus
2009-09-05  5:29           ` Suvayu Ali
     [not found] ` <mailman.5940.1251983344.2239.help-gnu-emacs@gnu.org>
2009-09-03 17:50   ` Benjamin Andresen
2009-09-04 11:12     ` Suvayu Ali [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=4AA0F630.70307@gmail.com \
    --to=fatkasuvayu+linux@gmail.com \
    --cc=help-gnu-emacs@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).