help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Dired confused by filenames starting with date-like strings


From: B. T. Raven
Subject: Re: Dired confused by filenames starting with date-like strings
Date: Fri, 25 Aug 2006 18:28:15 -0500

"Eli Zaretskii" <eliz@gnu.org> 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



reply via email to

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