From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Benjamin Andresen Newsgroups: gmane.emacs.help Subject: Re: Using tramp to connect to a remote emacs session Date: Thu, 03 Sep 2009 19:50:01 +0200 Organization: [ posted via ] IN-Ulm Message-ID: <87k50f535i.fsf@in-ulm.de> References: <4A9EFA5A.1030002@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1252040720 12709 80.91.229.12 (4 Sep 2009 05:05:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Sep 2009 05:05:20 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 04 07:05:14 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MjQz2-00031a-KX for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Sep 2009 07:05:13 +0200 Original-Received: from localhost ([127.0.0.1]:41819 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjQz1-0000OG-Iu for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Sep 2009 01:05:11 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!t-online.de!inka.de!rz.uni-karlsruhe.de!news.uni-stuttgart.de!newsfeed.in-ulm.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Original-X-Trace: news.in-ulm.de 7F44BA3D82764B74FA5377EAA1DA5FEB User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:ZraRQSusWDEscUOU701NQytEbKQ= Original-Xref: news.stanford.edu gnu.emacs.help:172682 X-Mailman-Approved-At: Fri, 04 Sep 2009 01:02:38 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67834 Archived-At: Michael Albinus 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