From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16533: 24.3.50; "s" no longer works as documented in dired Date: Sat, 25 Jan 2014 13:22:46 +0200 Message-ID: <8361p8cnll.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1390649053 6332 80.91.229.3 (25 Jan 2014 11:24:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Jan 2014 11:24:13 +0000 (UTC) Cc: 16533@debbugs.gnu.org, markus.triska@gmx.at To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 25 12:24:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W71LV-0006C8-Tu for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jan 2014 12:24:18 +0100 Original-Received: from localhost ([::1]:50742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W71LV-0000LW-HJ for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Jan 2014 06:24:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W71LM-0000DC-8K for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 06:24:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W71LG-0003yE-Ac for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 06:24:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W71LG-0003yA-7V for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 06:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W71LF-0004V3-WA for bug-gnu-emacs@gnu.org; Sat, 25 Jan 2014 06:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jan 2014 11:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16533-submit@debbugs.gnu.org id=B16533.139064898417224 (code B ref 16533); Sat, 25 Jan 2014 11:24:01 +0000 Original-Received: (at 16533) by debbugs.gnu.org; 25 Jan 2014 11:23:04 +0000 Original-Received: from localhost ([127.0.0.1]:35141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W71KK-0004Tj-AM for submit@debbugs.gnu.org; Sat, 25 Jan 2014 06:23:04 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:59188) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W71KH-0004TB-At for 16533@debbugs.gnu.org; Sat, 25 Jan 2014 06:23:02 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MZY00I00EZYVA00@a-mtaout22.012.net.il> for 16533@debbugs.gnu.org; Sat, 25 Jan 2014 13:22:59 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MZY00IHEFMBPH90@a-mtaout22.012.net.il>; Sat, 25 Jan 2014 13:22:59 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:83980 Archived-At: > From: Glenn Morris > 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.