GNU bug report logs -
#16533
24.3.50; "s" no longer works as documented in dired
Previous Next
Full log
View this message in rfc822 format
> From: Glenn Morris <rgm <at> gnu.org>
> Date: Fri, 24 Jan 2014 13:32:55 -0500
> Cc: 16533 <at> debbugs.gnu.org
>
> Please confirm what the problem actually is - just that it says "by
> date" in the mode line?
I think the problem is that is says "by date", but the actual sorting
is not changed, i.e. it stays by size in this case.
> When it does so, what are the values of
>
> dired-ls-sorting-switches
"SXU"
> dired-sort-by-date-regexp
"\\(\\`\\| \\)-[^- ]*t[^ SXU]*\\(\\(\\`\\| +\\)\\(--[^ ]+\\|-[^- tSXU]+\\)\\)* *$"
> dired-actual-switches
"-alSt"
And the latter is the root cause of the problem, IMO: the -S switch is
not removed from dired-actual-switches.
The problem here seems to be that dired-sort-toggle blindly adds the
"-t" flag to dired-actual-switches, although in this case the sorting
is not by date at all. I don't understand the logic here; it seems
like dired-sort-toggle assumes without testing that the directory is
sorted either by date or by name, which is of course false.
Is it a portable assumption that the last switch that determines the
sorting order overrides all the previous ones? If so, ls-lisp.el
should be fixed to implement that requirement. But if not, we need to
fix dired.el not to put more than one sorting option into
dired-actual-switches. In particular, the logic in dired-sort-toggle
seems to be flawed.
This bug report was last modified 11 years and 141 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.