From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#20739: 25.0.50; Dired switches have no effect when explicit list of files provided Date: Sun, 7 Jun 2015 18:58:42 -0700 (PDT) Message-ID: <6276d39d-958c-4dae-9223-2ef806a5761e@default> References: <<186494c2-6958-42eb-a351-6543237bfb75@default>> <<838ubvmj2s.fsf@gnu.org>> <<99d84238-3b80-4778-a248-7063a7e6b3df@default>> <<834mmjmgyu.fsf@gnu.org>> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1433728768 22167 80.91.229.3 (8 Jun 2015 01:59:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Jun 2015 01:59:28 +0000 (UTC) Cc: 20739@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 08 03:59:14 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 1Z1mLG-0002vN-RR for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Jun 2015 03:59:11 +0200 Original-Received: from localhost ([::1]:55618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1mLF-0000SU-Ms for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Jun 2015 21:59:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1mLC-0000SD-19 for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2015 21:59:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1mL8-0003sN-Pz for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2015 21:59:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1mL8-0003sF-Mh for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2015 21:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z1mL8-00081f-35 for bug-gnu-emacs@gnu.org; Sun, 07 Jun 2015 21:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jun 2015 01:59:02 +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.143372873330836 (code B ref 20739); Mon, 08 Jun 2015 01:59:02 +0000 Original-Received: (at 20739) by debbugs.gnu.org; 8 Jun 2015 01:58:53 +0000 Original-Received: from localhost ([127.0.0.1]:44421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1mKy-00081H-2v for submit@debbugs.gnu.org; Sun, 07 Jun 2015 21:58:52 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:26940) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z1mKv-000814-VZ for 20739@debbugs.gnu.org; Sun, 07 Jun 2015 21:58:50 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t581wgis012304 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 8 Jun 2015 01:58:42 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t581wgxR010024 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 8 Jun 2015 01:58:42 GMT Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t581wgUN005895; Mon, 8 Jun 2015 01:58:42 GMT In-Reply-To: <<834mmjmgyu.fsf@gnu.org>> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] 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:103727 Archived-At: > > > Not in my Emacs, built from the latest development sources. > > > > Interesting. I definitely see the list reversed correctly, even > > in this very recent build: > > > > In GNU Emacs 25.0.50.1 (i686-pc-mingw32) > > of 2015-05-29 on LEG570 >=20 > I tried on 3 different systems, one of them GNU/Linux -- none of > them exhibits the behavior you describe. You can try the same build I used, by downloading it from Dani's site: http://sourceforge.net/projects/emacs-bin/. That will take about 3 minutes altogether. Or you can take my word for it. The example I gave, and any number like it, are reproducible: (dired ("foo" "/path/to/bbbbb" "/path/to/foo.el" "/path/to/bar.el") "-alFr") (You can use just "-r" as well.) > > > Why do you think that what is controlled by the ls-lisp.el > > > code has nothing to do with this bug report? > > 'dired' on MS-Windows _calls_ functions in ls-lisp.el, but is not > implemented there. No one said the ls-lisp.el implements Dired entirely. It is, however, mostly responsible for the Dired listing that is produced. And that is the question here - what listing gets produced. > And the behavior you described, which handles > the case of a list as the 1st arg, is not implemented in ls-lisp.el, > it is implemented in subroutines of 'dired' defined on dired.el. I don't agree. When DIRNAME is a cons, `dired-insert-directory' is called with the buffer name as 1st arg, the switches as 2nd arg, and the list of files to be listed as the 3rd arg. That passes each of the files in the list, in turn, to `insert-directory', which passes each of them to `ls-lisp-insert-directory'. It is very much `ls-lisp-insert-directory' which is involved in the behavior we are discussing. It is that function that handles switch -B in the bugged way I reported. And it is that function that inserts the file and dir lines in the Dired buffer, correctly or not. Furthermore, in the case of a cons DIRNAME, `ls-lisp-insert-directory' is passed nil as its FULL-DIRECTORY-P arg, even for a directory in the list. (When DIRNAME is a directory, `t' is passed as arg FULL-DIRECTORY-P, and the behavior and code path is quite different.) In sum, `ls-lisp-insert-directory' handles the listing of the individual files & dirs contained in the cons DIRNAME arg to `dired'. =20 > Now, can we please stop splitting hair? Who's splitting hairs, Eli? You seem to want to say that the bug is fixed because you have stated in the doc (admittedly I have not seen the actual text) that switches that involve sort order have no effect when DIRNAME is a cons. Or perhaps you said something less committal, such as that some switches are not supported. My point is that the bug is about fixing the *behavior*, not just copping out in the doc. Most switches can be made to DTRT when DIRNAME is a cons. And switch -B for ls-lisp can at least be fixed in the way I indicated, to prevent a wrong-type-arg error. The bug subject line, and my detailed description of the bug, are about the fact that "Dired switches have no effect" when DIRNAME is a cons. It is not that the doc for this use case is incorrect or insufficient. It's great to improve the doc also, but that doesn't fix the problem I reported. That's all. That's not splitting hairs, in my book.