Subject: bug#952: 23.0.60; cons DIRNAME arg to `dired' makes it ignore SWITCHES arg

From: "Drew Adams" <[email-masked]>
Date: Tue, 9 Sep 2008 19:24:46 -0700

emacs -Q
 
M-: (dired '("c:/some/dir" "file1.el" "file2.el") "-lC")
 
where c:/some/dir is a directory containing files file1.el and file2.el.
 
The SWITCHES arg is ignored.
 
I've searched the doc and code but found no mention of this. The only
doc I've found for the `dired' args is the doc string, and according
to that the SWITCHES arg should always be respected.
 
I'm using MS Windows, so ls-lisp.el is involved here. I don't know
whether the same thing happens on GNU/Linux. However, switches such as
-lC and others that are ignored in this context work fine for (dired
"c:/some/dir" "-lC") and (dired "c:/some/dir/file*.el" "-lC"). 
 
I see no logical reason why the switches, or at least most of them,
shouldn't work also for an explicit list of files.
 
This same bug exists in Emacs 22, 21, and 20.

In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2008-08-29 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include
-fno-crossjumping'