all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mike Mattie <codermattie@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, Miles Bader <miles@gnu.org>
Subject: Re: paths are sensative to double separators
Date: Thu, 19 Mar 2009 10:50:54 -0700	[thread overview]
Message-ID: <20090319175054.GA11263@reforged> (raw)
In-Reply-To: <jwviqm54p7g.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]

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.

Cheers,
Mike Mattie


> 
>         Stefan

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

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2009-03-19 17:50 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
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 [this message]
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=20090319175054.GA11263@reforged \
    --to=codermattie@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    --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.