From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: Dired confused by filenames starting with date-like strings Date: Fri, 25 Aug 2006 18:28:15 -0500 Organization: UseNetServer.com Message-ID: <3be73$44ef8732$49f2063$21096@DIALUPUSA.NET> References: <1156356934.469929.210320@i3g2000cwc.googlegroups.com><1156441406.766871.297830@m73g2000cwd.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1156549294 18978 80.91.229.2 (25 Aug 2006 23:41:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Aug 2006 23:41:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 26 01:41:33 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GGlIl-0003ME-V1 for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Aug 2006 01:41:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGlIl-0002CI-GK for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Aug 2006 19:41:27 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon02.news.prodigy.net!prodigy.net!atl-c08.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!DIALUPUSA.NET!not-for-mail Original-Newsgroups: gnu.emacs.help X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Original-X-Complaints-To: abuse@usenetserver.com Original-Lines: 73 Original-X-Trace: 3be7344ef8732a13a85c621096 Original-Xref: shelby.stanford.edu gnu.emacs.help:141322 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36944 Archived-At: "Eli Zaretskii" wrote in message news:mailman.5588.1156462534.9609.help-gnu-emacs@gnu.org... > > From: kg6mar@gmail.com > > Newsgroups: gnu.emacs.help > > Date: 24 Aug 2006 10:43:26 -0700 > > > > > The variable `dired-use-ls-dired' controls whether dired does this or > > > not. So to fix this problem, try installing GNU ls (I guess that means > > > cygwin, as you're on ms-windows?) and setting dired-use-ls-dired to t. > > > > After more testing and advice-following, it still appears to me that ls > > is working as required, but dired can't parse this particular filename > > correctly from the ls output. It sounds as if it works on a Unix or > > linux emacs implementation but not Windows. > > Are you using the native Windows port of Emacs or the Cygwin port? > What does Emacs display when you type "M-x emacs-version RET"? > > If you are using the native Windows port, Emacs does not use the > external `ls' program (because it's generally unavailable on Windows > machines). Instead, it uses the `ls' emulation in Lisp; see > ls-lisp.el. > > ls-lisp.el is preloaded into the native Windows port; to disable it > and force Emacs to use the external `ls' program, set the variable > `ls-lisp-use-insert-directory-program' to a non-nil value. > > I have a similar setup to that of the OP and also have Cygwin installed but I use the native windows port (21.3.1) except on msw98 rather than xp. I don't think that emacs can "know" about cygwin unless I explicitly run a command (program) like ls by going through M-! M-! dir shows a listing like: 2006\ 08\ 23\ foo.txt x-test\ test\ test 2006-08-23\ foo.txt test\ test M-! ls shows the same but without the backslash before the spaces. This behavior isn't affected by the setting of ls-lisp-use-insert-directory-program. With this set to t, it seems like emacs should be using dir rather than ls. It doesn't know where to find the ls.exe binary in cygwin. Using %m in dired [^ ]+_ [^ ]* I get the following: drwxr-xr-x 2 youwho all 0 Aug 22 19:56 . drwxr-xr-x 54 youwho all 0 Dec 31 1969 .. * -rw-r--r-- 1 youwho all 0 Aug 25 16:57 2006 08 23 foo.txt -rw-r--r-- 1 youwho all 0 Aug 25 16:57 2006-08-23 foo.txt * -rw-r--r-- 1 youwho all 0 Aug 25 17:23 5 002.JPG * -rw-r--r-- 1 youwho all 0 Aug 25 18:19 b-b-b test ... * -rw-r--r-- 1 youwho all 234 Aug 25 17:22 test test * -rw-r--r-- 1 youwho all 0 Aug 25 17:23 x 002.JPG * -rw-r--r-- 1 youwho all 0 Aug 25 17:20 x-test test test 4 filenames with 1 space, 1 with 2, 1 with 3. Only the one with numbers delimited with dashes isn't marked. Ed