Subject: bug#20739: 25.0.50; Dired switches have no effect when explicit list of files provided

From: Eli Zaretskii <[email-masked]>
Date: Sat, 06 Jun 2015 12:36:31 +0300

> Date: Fri, 5 Jun 2015 01:34:40 -0700 (PDT)
> From: Drew Adams <[email-masked]>
> 
> emacs -Q
> 
> Given two files whose names are a.el and b.el, with b.el more recent
> than a.el.
> 
> M-: (dired '("foo" "a.el" "b.el") "-lstF")
> 
> The files are listed in alphabetic order, not by date as specified by
> arg SWITCHES and as indicated in the mode line.

No, they are listed in the order in which you specified them in the
list passed as the first argument to 'dired'.  That just happened to
coincide with alphabetic order in your case.

You evidently expected 'dired' to apply the order-related options in
switches to the entire list of files.  But that's not what 'dired'
does when it is called with its 1st argument a list.  What it does is
invoke 'insert-directory' with each of the files in the list, in
order, passing it the value of switches.  So when calling 'dired' in
this manner, the order-related switches have no effect whatsoever.

I've updated the doc string to mention this peculiarity.

> Hitting `s' any number of times has no effect on the order of the
> files.

For the same reason.