all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
	Emacs developers <emacs-devel@gnu.org>
Subject: Re: [Emacs-diffs] emacs lib-src/ChangeLog lib-src/emacsclient.c l...
Date: Tue, 10 Mar 2009 19:05:38 +0100	[thread overview]
Message-ID: <87iqmhi77x.fsf@kassiopeya.MSHEIMNETZ> (raw)
In-Reply-To: <f7ccd24b0903100813i606caddewc3549ab0d4eaf782@mail.gmail.com> (Juanma Barranquero's message of "Tue, 10 Mar 2009 16:13:57 +0100")

Juanma Barranquero <lekktu@gmail.com> writes:
> On Tue, Mar 10, 2009 at 15:09, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
>>        * emacsclient.c (main): Always pass cwd via "-dir".  Pass the file
>>        names without prepending cwd to them, so Emacs uses its customary
>>        rules 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,

-- 
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




  parent reply	other threads:[~2009-03-10 18:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1Lh2e7-0006nh-EY@cvs.savannah.gnu.org>
2009-03-10 15:13 ` [Emacs-diffs] emacs lib-src/ChangeLog lib-src/emacsclient.c l Juanma Barranquero
2009-03-10 15:58   ` Stefan Monnier
2009-03-11  0:57     ` Juanma Barranquero
2009-03-10 18:05   ` Sebastian Rose [this message]
2009-03-11  1:29     ` Stefan Monnier

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iqmhi77x.fsf@kassiopeya.MSHEIMNETZ \
    --to=sebastian_rose@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.