unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
To: Mike Mattie <codermattie@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: paths are sensative to double separators
Date: Thu, 19 Mar 2009 12:09:57 +0900	[thread overview]
Message-ID: <buoljr2gqd6.fsf@dhlpc061.dev.necel.com> (raw)
In-Reply-To: <20090319015037.GC6695@reforged> (Mike Mattie's message of "Wed,  18 Mar 2009 18:50:38 -0700")

Mike Mattie <codermattie@gmail.com> writes:
> I have noticed that paths in Emacs are sensitive to double separators e.g:
>
> (load /foo/bar/baz.el)  ;; works
> (load /foo/bar//baz.el) ;; broken
>
> The same behavior occurs with (find-file).
>
> This doesn't seem like a good thing. Is there a good reason for
> it that I am not aware of ?

It's a feature, as it makes filename entry more convenient, as you can
enter absolute filenames without erasing the existing path when entering
a filename.

Perhaps if Emacs were designed today, it might not do this pervasively,
and instead might just restrict this behavior to the filename prompting
functions (see, e.g. file-name-shadow-mode).

However, the current behavior has not been a problem in practice, as far
as I'm aware; the only place doubled slashes seem common is at the
beginning of a filename (because of naive DIR "/" REL_NAME concatention,
 with DIR == "/") , in which case the emacs behavior causes no change.

-Miles

-- 
Fast, small, soon; pick any 2.




  parent reply	other threads:[~2009-03-19  3:09 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
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 [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=buoljr2gqd6.fsf@dhlpc061.dev.necel.com \
    --to=miles@gnu.org \
    --cc=codermattie@gmail.com \
    --cc=emacs-devel@gnu.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).