From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: paths are sensative to double separators Date: Thu, 19 Mar 2009 12:09:57 +0900 Message-ID: References: <20090319015037.GC6695@reforged> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1237432224 6755 80.91.229.12 (19 Mar 2009 03:10:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Mar 2009 03:10:24 +0000 (UTC) Cc: emacs-devel@gnu.org To: Mike Mattie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 19 04:11:41 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 1Lk8fU-00051c-CV for ged-emacs-devel@m.gmane.org; Thu, 19 Mar 2009 04:11:40 +0100 Original-Received: from localhost ([127.0.0.1]:49523 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lk8e7-0005pu-Sf for ged-emacs-devel@m.gmane.org; Wed, 18 Mar 2009 23:10:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lk8e2-0005ph-LA for emacs-devel@gnu.org; Wed, 18 Mar 2009 23:10:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lk8dy-0005pT-1s for emacs-devel@gnu.org; Wed, 18 Mar 2009 23:10:10 -0400 Original-Received: from [199.232.76.173] (port=58122 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lk8dx-0005pQ-VO for emacs-devel@gnu.org; Wed, 18 Mar 2009 23:10:05 -0400 Original-Received: from tyo202.gate.nec.co.jp ([202.32.8.206]:42630) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lk8dv-0003tD-CI; Wed, 18 Mar 2009 23:10:04 -0400 Original-Received: from relay11.aps.necel.com ([10.29.19.46]) by tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id n2J39wN7013012; Thu, 19 Mar 2009 12:09:58 +0900 (JST) Original-Received: from relay11.aps.necel.com ([10.29.19.16] [10.29.19.16]) by relay11.aps.necel.com with ESMTP; Thu, 19 Mar 2009 12:09:58 +0900 Original-Received: from dhlpc061 ([10.114.112.72] [10.114.112.72]) by relay11.aps.necel.com with ESMTP; Thu, 19 Mar 2009 12:09:58 +0900 Original-Received: by dhlpc061 (Postfix, from userid 31295) id 3C97552E251; Thu, 19 Mar 2009 12:09:58 +0900 (JST) System-Type: x86_64-unknown-linux-gnu Blat: Foop In-Reply-To: <20090319015037.GC6695@reforged> (Mike Mattie's message of "Wed, 18 Mar 2009 18:50:38 -0700") Original-Lines: 28 X-detected-operating-system: by monty-python.gnu.org: Solaris 8 (1) 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:109683 Archived-At: Mike Mattie 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.