From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Suvayu Ali Newsgroups: gmane.emacs.help Subject: Re: Using tramp to connect to a remote emacs session Date: Fri, 04 Sep 2009 04:12:48 -0700 Message-ID: <4AA0F630.70307@gmail.com> References: <4A9EFA5A.1030002@gmail.com> <87k50f535i.fsf@in-ulm.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1252062832 9839 80.91.229.12 (4 Sep 2009 11:13:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Sep 2009 11:13:52 +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 13:13:45 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 1MjWjg-0000ZV-PU for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Sep 2009 13:13:45 +0200 Original-Received: from localhost ([127.0.0.1]:48591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjWjf-0006fZ-VN for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Sep 2009 07:13:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjWiv-0006fO-IF for help-gnu-emacs@gnu.org; Fri, 04 Sep 2009 07:12:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjWir-0006em-1D for help-gnu-emacs@gnu.org; Fri, 04 Sep 2009 07:12:57 -0400 Original-Received: from [199.232.76.173] (port=44270 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjWiq-0006ej-Sy for help-gnu-emacs@gnu.org; Fri, 04 Sep 2009 07:12:52 -0400 Original-Received: from mail-pz0-f191.google.com ([209.85.222.191]:49810) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MjWip-000883-OV for help-gnu-emacs@gnu.org; Fri, 04 Sep 2009 07:12:52 -0400 Original-Received: by pzk29 with SMTP id 29so614053pzk.1 for ; Fri, 04 Sep 2009 04:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=VWi+TmAjMIssWIwTJdLAZSWTJcFZ3IapHsgu0yI15Lg=; b=CtAsUmQIrdZjFDOHapX8o5y8rB9Lt+E98UmPWR5EXyxKHt5Jmnuatya8iG7VAMSYc0 VIjNPvO1HOypVx/TTbJOQnrGpVjkcvmxRkLqEOCnGB8eyeuGCGXXE9bE0hQz7IvdApv+ LN8A/sf8uDHM9OxI3rH1VWlNzF2IB60XTMQuA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=jJ48W/e+n5P38WXZjPVQoYCtcdh9+NlwD6qd4QBMrrPEbhZ+Byzy5b1Pir40/CsfWb i4PP2fm1/KsRABas7jTDwF+vpeab81QAcjJrTXlMOBkZYkx3zUwuhJiSUO7kyCrL8av9 awg/eyRcXnQEwY5285MizLkf38QQrpN8tIECQ= Original-Received: by 10.115.84.39 with SMTP id m39mr9882111wal.62.1252062770808; Fri, 04 Sep 2009 04:12:50 -0700 (PDT) Original-Received: from bhishma.kuru (d66-183-43-146.bchsia.telus.net [66.183.43.146]) by mx.google.com with ESMTPS id 23sm250031pzk.4.2009.09.04.04.12.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 04 Sep 2009 04:12:50 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3 In-Reply-To: <87k50f535i.fsf@in-ulm.de> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:67862 Archived-At: On Thursday 03 September 2009 10:50 AM, Benjamin Andresen wrote: > 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? > 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.