all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Glenn Morris <rgm@gnu.org>
Cc: 16533@debbugs.gnu.org, markus.triska@gmx.at
Subject: bug#16533: 24.3.50; "s" no longer works as documented in dired
Date: Sat, 25 Jan 2014 13:22:46 +0200	[thread overview]
Message-ID: <8361p8cnll.fsf@gnu.org> (raw)
In-Reply-To: <c9y525s014.fsf@fencepost.gnu.org>

> From: Glenn Morris <rgm@gnu.org>
> Date: Fri, 24 Jan 2014 13:32:55 -0500
> Cc: 16533@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.





  reply	other threads:[~2014-01-25 11:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-24  0:33 bug#16533: 24.3.50; "s" no longer works as documented in dired Markus Triska
2014-01-24  3:10 ` Glenn Morris
2014-01-24  3:13   ` Glenn Morris
2014-01-24 17:23     ` Markus Triska
2014-01-24 18:32       ` Glenn Morris
2014-01-25 11:22         ` Eli Zaretskii [this message]
2014-01-26  1:31           ` Glenn Morris
2014-01-25 11:02       ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=8361p8cnll.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=16533@debbugs.gnu.org \
    --cc=markus.triska@gmx.at \
    --cc=rgm@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.