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#20739: 25.0.50; Dired switches have no effect when explicit list of files provided Date: Sat, 06 Jun 2015 22:27:35 +0300 Message-ID: <83oaksmyc8.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1433618901 4940 80.91.229.3 (6 Jun 2015 19:28:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Jun 2015 19:28:21 +0000 (UTC) Cc: 20739@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 06 21:28:11 2015 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 1Z1JlJ-0000it-Ty for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Jun 2015 21:28:10 +0200 Original-Received: from localhost ([::1]:52403 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1JlJ-0000wP-BB for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Jun 2015 15:28:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1JlF-0000wJ-Ju for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2015 15:28:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1JlC-00019T-CQ for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2015 15:28:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1JlC-00019N-8d for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2015 15:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z1JlB-00073A-MW for bug-gnu-emacs@gnu.org; Sat, 06 Jun 2015 15:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Jun 2015 19:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20739 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20739-submit@debbugs.gnu.org id=B20739.143361886527079 (code B ref 20739); Sat, 06 Jun 2015 19:28:01 +0000 Original-Received: (at 20739) by debbugs.gnu.org; 6 Jun 2015 19:27:45 +0000 Original-Received: from localhost ([127.0.0.1]:43495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1Jku-00072g-J6 for submit@debbugs.gnu.org; Sat, 06 Jun 2015 15:27:45 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:38134) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1Jks-00072S-CS for 20739@debbugs.gnu.org; Sat, 06 Jun 2015 15:27:43 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NPJ00C00EKFIL00@a-mtaout21.012.net.il> for 20739@debbugs.gnu.org; Sat, 06 Jun 2015 22:27:35 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NPJ00C3IFDZHV60@a-mtaout21.012.net.il>; Sat, 06 Jun 2015 22:27:35 +0300 (IDT) 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:103673 Archived-At: > Date: Sat, 6 Jun 2015 11:43:20 -0700 (PDT) > From: Drew Adams > Cc: 20739@debbugs.gnu.org > > > 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 think you are describing what it does, and not what it should > do or perhaps could do, and which would be more in line with user > expectations. Yes, that is what the behavior is now. I'm describing what it does, yes. I have no idea what it should do; it's not like there's a requirements document somewhere that we could consult. And the documentation leaves that unspecified. > A priori, a user can reasonably expect switches to have their usual > effect. Can we at least keep this expectation/request open as an > enhancement request? I didn't close the bug. > In any case, the problem wrt `ls' switches is not total. Some parts > of this bug/enhancement can be taken care of (fixed) more easily. > > `i', for instance, shows inodes, and `h' shows file sizes in > human-friendly units. But other switches are not reflected in the > Dired behavior when you provide an explicit list of files and dirs. > > The behavior is limited, I'm guessing, wrt any parts of `ls' that > depend on the whole list of files and subdirs. It seems that parts > of the `ls' behavior that depend only on the info about a given > file are retained. Yes. > > 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. > > First, the doc should specify what I said above (if it is in fact > the case): `ls' behavior that depends on the entire list is not > available for this use case - the only switches that affect the > display are those that depend only on the info for an individual > file or dir; other switches are ignored. I've found no switches that are ignored as result of this implementation, except those that control the order of the files in the listing, so that's what I stated in the doc string. I think this makes the actual behavior clear enough. > Second, it's not just about the doc string. If no improvement > in the behavior is to be expected (I would prefer that it be > improved to respect the switches generally, to the extent that is > possible), then I think a minimum bug fix, beyond the doc (see > above), would be to change the mode-line lighter. At a bare > minimum, the misleading lighter indications "by name|date" need > to be removed. > > Whe DIRNAME is a cons, the lighter should not show anything like > "by name" or "by date". Instead, it should either have just > "Dired" or (better) include some indication that the listing is > from an explicit list and not necessarily a directory listing. > In the latter case, it could also show the (relevant) switches. The 's' toggle's implementation is problematic to begin with, IMO, so it's small wonder that it doesn't work right in this case.