From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Mattie Newsgroups: gmane.emacs.devel Subject: Re: paths are sensative to double separators Date: Thu, 19 Mar 2009 10:50:54 -0700 Message-ID: <20090319175054.GA11263@reforged> References: <20090319015037.GC6695@reforged> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0OAP2g/MAC+5xKAE" X-Trace: ger.gmane.org 1237486731 10226 80.91.229.12 (19 Mar 2009 18:18:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Mar 2009 18:18:51 +0000 (UTC) Cc: emacs-devel@gnu.org, Miles Bader To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 19 19:20:04 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LkMqN-0001Ph-DF for ged-emacs-devel@m.gmane.org; Thu, 19 Mar 2009 19:19:52 +0100 Original-Received: from localhost ([127.0.0.1]:60795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkMp0-0003qb-Rg for ged-emacs-devel@m.gmane.org; Thu, 19 Mar 2009 14:18:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LkMOX-0008To-Hq for emacs-devel@gnu.org; Thu, 19 Mar 2009 13:51:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LkMOS-0008NX-4Q for emacs-devel@gnu.org; Thu, 19 Mar 2009 13:51:04 -0400 Original-Received: from [199.232.76.173] (port=57944 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkMOR-0008NL-T8 for emacs-devel@gnu.org; Thu, 19 Mar 2009 13:50:59 -0400 Original-Received: from rv-out-0708.google.com ([209.85.198.247]:54153) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LkMOQ-0005Tw-F8; Thu, 19 Mar 2009 13:50:58 -0400 Original-Received: by rv-out-0708.google.com with SMTP id f25so797332rvb.6 for ; Thu, 19 Mar 2009 10:50:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=UyX5nM8GiiDAg7B2Y7JdD/lXqT9XEerPtacffXOWhWI=; b=FJ7LMyUfLqN/V9Wfu4ioap4I9O3trryaqIJYWdGdolRFG6kHp+fpLnbpbe6XcTahGT SEGm8jodpMZ9xzkBl9SQJXInQwy54F/lTBB2nKv3jIQJ56+LeErzZscEFk/FHnnkxTk9 gcSajYvJvVT16I5Xj4qBqCnkzWRlkgL9JsRNo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=RULxkGHFiSsXeyG3PG1XZOsszNKK7Gr/1d3LFrRoM+oHYrEk/AWbNSQW2OCCef6c3G VUpzByIJ8IqkDWx4Dnx7TOvYKMzXWxb6UtLpyeoggb43TtSknlg8OHPWVuY5VefsMn67 iJmGjW4AeUvf5UJWqwN8mmY01qhpbADNQmZUk= Original-Received: by 10.114.168.1 with SMTP id q1mr1802620wae.152.1237485056781; Thu, 19 Mar 2009 10:50:56 -0700 (PDT) Original-Received: from @ (c66-235-1-45.sea2.cablespeed.com [66.235.1.45]) by mx.google.com with ESMTPS id n6sm1388712wag.67.2009.03.19.10.50.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 19 Mar 2009 10:50:56 -0700 (PDT) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109701 Archived-At: --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > 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 sti= ll 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 >=20 > Stefan --=20 GnuPG Key: B9012279 is available from HKP server pgp.mit.edu --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAknChf0ACgkQdfRchrkBInnxcwCfcMrrLGSI31h442eCz17wivMh b7cAoO/Cvog46fC2oRjrZ8ZKlrTIwi4U =Hn0t -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE--