emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: paths are sensative to double separators


From: Miles Bader
Subject: Re: paths are sensative to double separators
Date: Thu, 19 Mar 2009 12:09:57 +0900

Mike Mattie <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]