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: kg6mar
Subject: Re: Dired confused by filenames starting with date-like strings
Date: 24 Aug 2006 10:43:26 -0700
User-agent: G2/0.2

Miles Bader wrote:
> address@hidden writes:
> > Dired gets confused by certain filenames in which the beginning
> > resembles a date and there is an embedded space (my photograph naming
> > convention).  It fails to assemble the entire filename.
>
> This works correctly on my system, because dired invokes ls with the
> "--dired" option (a feature of GNU ls, which causes ls to output extra
> information about where the names are located).
>
> 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.

- Emacs 21.3.1 for Windows doesn't appear to have a variable called
dired-use-ls-dired, but I can set dired-listing-switches to "-lD" which
invokes the ls --dired option, achieving the same purpose.

-  I verified that I'm using cygwin's ls.  I tried the --dired option
suggested here, with no different final result.

I tested some more filenames.  Of the following, the only one dired
can't Copy or Rename correctly is the last (which it takes to be
foo.txt).  Again, the problematic name begins with a string that looks
like a date, and has a space after that.  These are cut and pasted from
dired:


-rw-rw-rw-   1 John     root      3 Aug 23 19:34 2006-08-23.txt
-rw-rw-rw-   1 John     root      3 Aug 23 19:34 2006-08-23foo.txt
-rw-rw-rw-   1 John     root      3 Aug 23 19:34 foo 2006-08-23 foo.txt
-rw-rw-rw-   1 John     root      3 Aug 23 19:34 2006-08-23 foo.txt

I appreciate your thinking here.

-- John



reply via email to

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