all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc: xah@xahlee.org, Mike Mattie <codermattie@gmail.com>, emacs-devel@gnu.org
Subject: Re: paths are sensative to double separators
Date: Fri, 20 Mar 2009 14:48:44 +0900	[thread overview]
Message-ID: <87ocvwsq0z.fsf@xemacs.org> (raw)
In-Reply-To: <87tz5p5xyo.fsf@kobe.laptop>

Giorgos Keramidas writes:

 > > Which is rather uncommon and has an obvious, Emacs-wide solution: C-q /.
 > 
 > Unfortunately, quoting either slash of the double slash parts in
 > something like `C-x C-f /etc//foo' still restarts the search from the
 > filesystem root here

To me quoting the first slash would be a no-op, but quoting the second
slash should work.  But it does the same thing you observe in 22.1.1
here.  So I guess that's intentional.

I think it's astonishing that Emacs overrides the user's explicit
intent, and it should be changed.

 > I think if `C-x C-f /etc/ C-q / foo' really passed "/etc//foo" as
 > the file path name to the find-file function, it might be a nice
 > change that doesn't feel too surprising to someone who relies on
 > the current behavior.

I can't imagine anyone relies on having Emacs deliberately disobey
"/foo/" C-q "/" and convert it to "/".

Hm, interesting.  In the minibuffer, XEmacs takes C-q at its word, but
find-file (and completion) indeed converts "/foo/bar//" to "/".  This
is really ugly IMO.  I wonder what it takes to fix.  Interestingly,
"/etc/./foo" and "/etc/bar/../foo" work as expected, but both XEmacs
and Emacs 22.1.1 canonicalize the path to "/etc/foo".

N.B.  This matters if you want to use URLs, because not only do you
need the colon-double-slash to define the authority (which could be
special-cased in the function that canonicalizes paths, I guess), but
the RFCs don't define the semantics of double slash (and the Mercurial
URL hg://foo/bar means something different from hg://foo//bar).





  reply	other threads:[~2009-03-20  5:48 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-19  1:50 paths are sensative to double separators Mike Mattie
2009-03-19  2:50 ` xah lee
2009-03-19  5:42   ` Harald Hanche-Olsen
2009-03-19  6:54     ` Miles Bader
2009-03-19 16:33     ` David De La Harpe Golden
2009-03-19 19:37     ` Richard M Stallman
2009-03-20  0:38     ` xah lee
2009-03-19  9:48   ` Sebastian Rose
2009-03-19 11:16   ` Giorgos Keramidas
2009-03-19 14:20     ` Stephen J. Turnbull
2009-03-19 15:33       ` Giorgos Keramidas
2009-03-20  5:48         ` Stephen J. Turnbull [this message]
2009-03-20 12:57           ` Stefan Monnier
2009-03-20 14:55             ` Stephen J. Turnbull
2009-03-20 20:19               ` Stefan Monnier
2009-03-20 21:24                 ` Giorgos Keramidas
2009-03-20 22:56                   ` Sebastian Rose
2009-03-21  0:12                     ` Miles Bader
2009-03-21  4:43                   ` Stephen J. Turnbull
2009-03-21 16:04                     ` Giorgos Keramidas
2009-03-20 15:01             ` Eli Zaretskii
2009-03-20 20:14               ` Stefan Monnier
2009-03-19 15:47     ` Stefan Monnier
2009-03-19 19:08       ` Giorgos Keramidas
2009-03-19 23:59     ` Byung-Hee HWANG
2009-03-19  3:09 ` Miles Bader
2009-03-19 10:26   ` Sebastian Rose
2009-03-19 15:46     ` Miles Bader
2009-03-19 20:32     ` Stefan Monnier
2009-03-19 21:18       ` Sebastian Rose
2009-03-19 13:33   ` Stefan Monnier
2009-03-19 17:50     ` Mike Mattie
2009-03-19 20:34       ` Stefan Monnier
2009-03-19 21:32         ` Mike Mattie
  -- strict thread matches above, loose matches on Subject: below --
2009-03-19 21:25 Xavier Maillard

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=87ocvwsq0z.fsf@xemacs.org \
    --to=stephen@xemacs.org \
    --cc=codermattie@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=keramida@ceid.upatras.gr \
    --cc=xah@xahlee.org \
    /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.