From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Mauger Newsgroups: gmane.emacs.devel Subject: Re: emacsclient: --quiet/--verbose Date: Sat, 2 Dec 2006 14:02:04 -0800 (PST) Message-ID: <20061202220204.77195.qmail@web62506.mail.re1.yahoo.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ascii Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1165096954 1363 80.91.229.2 (2 Dec 2006 22:02:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 2 Dec 2006 22:02:34 +0000 (UTC) Cc: Emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 02 23:02:33 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GqcwB-0004NS-Dl for ged-emacs-devel@m.gmane.org; Sat, 02 Dec 2006 23:02:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GqcwB-0007Gj-2b for ged-emacs-devel@m.gmane.org; Sat, 02 Dec 2006 17:02:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gqcvv-0007Fm-1Q for emacs-devel@gnu.org; Sat, 02 Dec 2006 17:02:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gqcvu-0007FO-DL for Emacs-devel@gnu.org; Sat, 02 Dec 2006 17:02:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gqcvu-0007FJ-6q for Emacs-devel@gnu.org; Sat, 02 Dec 2006 17:02:06 -0500 Original-Received: from [69.147.75.98] (helo=web62506.mail.re1.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.52) id 1Gqcvt-0004IM-Ja for Emacs-devel@gnu.org; Sat, 02 Dec 2006 17:02:05 -0500 Original-Received: (qmail 77197 invoked by uid 60001); 2 Dec 2006 22:02:04 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=zQfPyHbwYKhQWCgwnAyRI5wROgAKaCIl9xljckpBjY90If2tbJNSo7A+FdZYBH961YNVeZYUB16waj421fISfMHaCZQ7aQK1zKoxq2n7eWPUqwSxMtejA9jhKFykc15CFYKD9XJdObSLQjF892kNrZKRFtZ5fL6sek5an+LXLCo= ; Original-Received: from [71.192.101.190] by web62506.mail.re1.yahoo.com via HTTP; Sat, 02 Dec 2006 14:02:04 PST Original-To: Lennart Borgman X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:63236 Archived-At: Lennart Borgman wrote:=0A=0A>Michael Mauger wrote:=0A>> Juanma Barranquero = wrote:=0A>>> On 12/1/06, Michael Mauger wrote:=0A>>>=0A>>= >> Finally, if people could take another look at the Tramp changes I=0A>>>>= proposed for emacsclient.=0A>>> I don't have anything about emacsclient us= ing Tramp, as long as it is=0A>>> not the only way, of course. TCP sockets = are fine for my uses.=0A>> =0A>> See http://lists.gnu.org/archive/html/emac= s-devel/2006-11/msg01195.html for=0A>> the Tramp patch.=0A>> =0A>> The use = of Tramp doesn't impact how emacsclient and emacs communicate. It=0A>> has= to do with how does emacs addresses the file that resides on a remote=0A>>= machine. My patch allowed you on the remote machine to address the file= =0A>> locally to emacsclient, but pass a filename that would appear remote = to=0A>> emacs. Obviously, if emacsclient and emacs were on the same machin= e, the=0A>> Tramp settings would not be set and things would work as they d= o now. (The=0A>> version of gnuclient I use to use had a similar feature t= hat spoiled me=0A>> rotten.)=0A>> =0A>> An example:=0A>> =0A>> me@aaa $ ema= cs &=0A>> me@aaa $ ssh bbb -l me=0A>> =0A>> me@bbb $ scp me@aaa:.emacs.d/se= rver/server ~/.emacs.d/server/me-aaa=0A>> me@bbb $ EMACS_SERVER_FILE=3D$HOM= E/.emacs.d/server/me-aaa=0A>> me@bbb $ export EMACS_SERVER_FILE=0A>> me@bbb= $ cd /etc=0A>> =0A>> (Now I want to edit the /etc/hosts file but there is = no emacs available on=0A>> bbb, so I ask to edit it in the emacs instance = under me@aaa)=0A>> =0A>> me@bbb $ emacsclient /me@bbb:/etc/hosts # witho= ut Tramp support =0A>> # Must specify Tramp prefix an= d absolute file name=0A>> =0A>> me@bbb $ EMACS_TRAMP_PREFIX=3D/me@bbb:=0A>>= me@bbb $ export EMACS_TRAMP_PREFIX=0A>> me@bbb $ emacsclient hosts = # same as above with=0A>> Tramp support=0A>> = # emacsclient sends Tramp prefix and makes filename=0A>> absolute= =0A>=0A>=0A>I do not think this can work. (Or am I misunderstanding somethi= ng?) =0A>Emacsclient have to expand local file names before sending them to= emacs =0A>server since the server and the client may have different workin= g =0A>directories.=0A>=0A>Could not your problem be solved with a shell scr= ipt that adds =0A>EMACS_TRAMP_PREFIX to the file names before calling emacs= client?=0A>=0A=0AActually it works very nicely. emacsclient expands the lo= cal filename into an absolute filename (as it currenty does) and prefixes t= hat with the Tramp prefix when it sends it to Emacs. I use emacsclient no = differently than if the emacs instance were local, and it communicates the = correct filename (not only in the correct directory, but on the correct rem= ote machine).=0A=0AAnd yes this could be done with a script around emacscli= ent, but the script would have to make the filename absolute itself (becaus= e the Tramp prefix will make the filename look absolute already). Obviousl= y, not difficult, but with a small patch, emacsclient can do all of it out-= of-the-box.