unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "B. T. Raven" <ecinmn@alcisp.com>
Subject: Re: Dired confused by filenames starting with date-like strings
Date: Fri, 25 Aug 2006 18:28:15 -0500	[thread overview]
Message-ID: <3be73$44ef8732$49f2063$21096@DIALUPUSA.NET> (raw)
In-Reply-To: mailman.5588.1156462534.9609.help-gnu-emacs@gnu.org


"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

  parent reply	other threads:[~2006-08-25 23:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-23 18:15 Dired confused by filenames starting with date-like strings kg6mar
2006-08-23 22:17 ` Miles Bader
2006-08-24 11:56   ` Peter Dyballa
2006-08-24 14:27     ` Kevin Rodgers
     [not found]   ` <mailman.5544.1156420601.9609.help-gnu-emacs@gnu.org>
2006-08-24 14:35     ` Miles Bader
2006-08-24 15:05       ` Peter Dyballa
2006-08-24 16:12         ` Dired doesn't decode UTF-8 file names (was: Dired confused by filenames starting with date-like strings) Kevin Rodgers
2006-08-24 19:48           ` Peter Dyballa
2006-08-28 15:02             ` Dired doesn't decode UTF-8 file names Kevin Rodgers
2006-08-28 15:44               ` Peter Dyballa
2006-08-28 20:52                 ` Kevin Rodgers
2006-08-28 21:29                   ` Peter Dyballa
     [not found]                   ` <mailman.5855.1156800592.9609.help-gnu-emacs@gnu.org>
2006-08-28 21:36                     ` David Kastrup
     [not found] ` <mailman.5520.1156371436.9609.help-gnu-emacs@gnu.org>
2006-08-24 17:43   ` Dired confused by filenames starting with date-like strings kg6mar
2006-08-24 23:35     ` Eli Zaretskii
2006-08-25  0:41     ` Miles Bader
     [not found]     ` <mailman.5588.1156462534.9609.help-gnu-emacs@gnu.org>
2006-08-25 23:28       ` B. T. Raven [this message]
2006-08-26 12:09         ` Eli Zaretskii
     [not found]         ` <mailman.5676.1156594178.9609.help-gnu-emacs@gnu.org>
2006-08-27  0:58           ` B. T. Raven
2006-08-27  1:41             ` Miles Bader
     [not found]             ` <mailman.5698.1156642923.9609.help-gnu-emacs@gnu.org>
2006-09-07  3:08               ` kg6mar
2006-09-07 13:44                 ` Miles Bader
2006-11-02 17:59               ` John Olson
2006-08-24 21:48   ` Jesse Alama

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='3be73$44ef8732$49f2063$21096@DIALUPUSA.NET' \
    --to=ecinmn@alcisp.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).