From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Rose Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] emacs lib-src/ChangeLog lib-src/emacsclient.c l... Date: Tue, 10 Mar 2009 19:05:38 +0100 Message-ID: <87iqmhi77x.fsf@kassiopeya.MSHEIMNETZ> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1236708194 21373 80.91.229.12 (10 Mar 2009 18:03:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Mar 2009 18:03:14 +0000 (UTC) Cc: Stefan Monnier , Emacs developers To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 10 19:04:29 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lh6JJ-0007n5-EV for ged-emacs-devel@m.gmane.org; Tue, 10 Mar 2009 19:04:13 +0100 Original-Received: from localhost ([127.0.0.1]:54414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lh6Hx-0001j0-Tb for ged-emacs-devel@m.gmane.org; Tue, 10 Mar 2009 14:02:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lh6Hs-0001iZ-9g for emacs-devel@gnu.org; Tue, 10 Mar 2009 14:02:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lh6Hq-0001gC-LN for emacs-devel@gnu.org; Tue, 10 Mar 2009 14:02:43 -0400 Original-Received: from [199.232.76.173] (port=37438 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lh6Hq-0001fz-FU for emacs-devel@gnu.org; Tue, 10 Mar 2009 14:02:42 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:42262) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Lh6Hp-00068p-MM for emacs-devel@gnu.org; Tue, 10 Mar 2009 14:02:42 -0400 Original-Received: (qmail invoked by alias); 10 Mar 2009 18:02:38 -0000 Original-Received: from p5B041596.dip0.t-ipconnect.de (EHLO kassiopeya.MSHEIMNETZ.gmx.de) [91.4.21.150] by mail.gmx.net (mp044) with SMTP; 10 Mar 2009 19:02:38 +0100 X-Authenticated: #8529601 X-Provags-ID: V01U2FsdGVkX18yHHAutcIyiAJ9MQX+ac3th5cd/wBbbizRJuGSt9 QhbfReYsF6Ztut In-Reply-To: (Juanma Barranquero's message of "Tue, 10 Mar 2009 16:13:57 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.57 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:109543 Archived-At: Juanma Barranquero writes: > On Tue, Mar 10, 2009 at 15:09, Stefan Monnier = wrote: > >> =C2=A0 =C2=A0 =C2=A0 =C2=A0* emacsclient.c (main): Always pass cwd via "= -dir". =C2=A0Pass the file >> =C2=A0 =C2=A0 =C2=A0 =C2=A0names without prepending cwd to them, so Emac= s uses its customary >> =C2=A0 =C2=A0 =C2=A0 =C2=A0rules to determine how to interpret the file = name. > > This change breaks useful Windows behavior. > > Previously: > > C:\> g: > G:\> cd test > G:\test> c: > C:\> emacsclient g:myfile.txt > > opened g:\test\myfile.txt. Now it tries to open g:/myfile.txt. > > The problem is that the "Emacs [...] customary rules to determine how > to interpret the file name" do not help, because the interpretation of > g:myfile.txt depends on the shell where you do run emacsclient (you > can perfectly have two different default directories in g: in > different shell invocations). > > Juanma I think that indeed emacsclient should behave like most other applications do these days, and always request absolute filenames of the form: Protocol://path/to/resource (NOTE: no special OS dependend directory separator) In your example: g:/myfile.txt which is what you requested, but for another reason I believe. `g:' should be considered a _protocol_ `g' and therefore map to `g:/myfile'. See rfc1738 section 2.1 for more on this. If emacsclient finds a relative filename that is 1.) not starting with a protocol 2.) not starting with a slash it should try to make it absolute and add the `file:' protocol. That way emacsclient would become much more usefull, than it is now. We can open `file:///home/sebastian/.emacs' through find-file, but not through `emacsclient file:///home/sebastian/.emacs' which is a bug IMHO. Best regards, --=20 Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover Tel.: +49 (0)511 - 36 58 472 Fax: +49 (0)1805 - 233633 - 11044 mobil: +49 (0)173 - 83 93 417 Email: s.rose@emma-stil.de, sebastian_rose@gmx.de Http: www.emma-stil.de