[Top][All Lists]

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

Re: paths are sensative to double separators

From: Mike Mattie
Subject: Re: paths are sensative to double separators
Date: Thu, 19 Mar 2009 10:50:54 -0700
User-agent: Mutt/1.5.16 (2007-06-09)

On Thu, Mar 19, 2009 at 09:33:56AM -0400, Stefan Monnier wrote:
> > 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.
> Yes, it's a feature in find-file (actually in the underlying
> `read-file-name' function).  It's normally only used for interactive
> filename entry, with one historical exception: `load'.
> It's implemented by `substitute-in-file-name' which additionally does
> expansion of envvars, so (load "$FOOBAR/lisp/toto.el") also works.
> This `load' exception is undesirable, but at this point, it's not clear
> whether it's best to fix it or to preserve compatibility.

I can certianly understand when find-file has interesting behavior, in
fact I expect that sort of thing from Emacs. Especially from the "Emacs still
runs on my steam powered dinosaur" angle.

the 'load' case is what spurred me to bring up the issue. I cannot
be sure that some path set by the user contains a trailing '/',
and so I need to append one.

I can, and do now check for this:

(replace-regexp-in-string "/+" "/" path)

but having to gaurd every path is simply begging for errors.
When the beta period is over I would like to revisit the
issue with a patch.

Thank you for expanding on my question so thoroughly,
it was educational.

Mike Mattie

>         Stefan

GnuPG Key: B9012279 is available from HKP server pgp.mit.edu

Attachment: pgp9MXtCJqCnU.pgp
Description: PGP signature

reply via email to

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