GNU logs - #20739, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50; Dired switches have no effect when explicit list of files provided
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 05 Jun 2015 08:35:02 +0000
Resent-Message-ID: <handler.20739.B.143349329712569 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 20739 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.143349329712569
          (code B ref -1); Fri, 05 Jun 2015 08:35:02 +0000
Received: (at submit) by debbugs.gnu.org; 5 Jun 2015 08:34:57 +0000
Received: from localhost ([127.0.0.1]:41080 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z0n5d-0003Gf-2R
	for submit <at> debbugs.gnu.org; Fri, 05 Jun 2015 04:34:57 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41751)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1Z0n5a-0003GS-Rt
 for submit <at> debbugs.gnu.org; Fri, 05 Jun 2015 04:34:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1Z0n5U-00010i-S1
 for submit <at> debbugs.gnu.org; Fri, 05 Jun 2015 04:34:49 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:40450)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1Z0n5U-00010e-P9
 for submit <at> debbugs.gnu.org; Fri, 05 Jun 2015 04:34:48 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55258)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1Z0n5T-0002qa-8d
 for bug-gnu-emacs@HIDDEN; Fri, 05 Jun 2015 04:34:48 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1Z0n5P-000105-8Q
 for bug-gnu-emacs@HIDDEN; Fri, 05 Jun 2015 04:34:47 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:29735)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1Z0n5P-000101-22
 for bug-gnu-emacs@HIDDEN; Fri, 05 Jun 2015 04:34:43 -0400
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
 t558Yf72005717
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
 for <bug-gnu-emacs@HIDDEN>; Fri, 5 Jun 2015 08:34:42 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t558YfrU001369
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL)
 for <bug-gnu-emacs@HIDDEN>; Fri, 5 Jun 2015 08:34:41 GMT
Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9])
 by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t558Yfq5026735
 for <bug-gnu-emacs@HIDDEN>; Fri, 5 Jun 2015 08:34:41 GMT
MIME-Version: 1.0
Message-ID: <3362479c-11a3-4559-88d6-666f03933440@default>
Date: Fri, 5 Jun 2015 01:34:40 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

emacs -Q

Given two files whose names are a.el and b.el, with b.el more recent
than a.el.

M-: (dired '("foo" "a.el" "b.el") "-lstF")

The files are listed in alphabetic order, not by date as specified by
arg SWITCHES and as indicated in the mode line.

Hitting `s' any number of times has no effect on the order of the
files.  But it updates the mode line in a misleading way, saying
alternately that the files are ordered by dated.



In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2014-10-20 on LEG570
Bzr revision: 118168 rgm@HIDDEN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking=3Dyes,glyphs CPPFLAGS=3D-DGLYPH_DEBUG=3D1'




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.503 (Entity 5.503)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Drew Adams <drew.adams@HIDDEN>
Subject: bug#20739: Acknowledgement (25.0.50; Dired switches have no
 effect when explicit list of files provided)
Message-ID: <handler.20739.B.143349329712569.ack <at> debbugs.gnu.org>
References: <3362479c-11a3-4559-88d6-666f03933440@default>
X-Gnu-PR-Message: ack 20739
X-Gnu-PR-Package: emacs
Reply-To: 20739 <at> debbugs.gnu.org
Date: Fri, 05 Jun 2015 08:35:03 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 20739 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
20739: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D20739
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50; Dired switches have no effect when explicit list of files provided
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 05 Jun 2015 14:26:01 +0000
Resent-Message-ID: <handler.20739.B20739.143351432918110 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Drew Adams <drew.adams@HIDDEN>
Cc: 20739 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 20739-submit <at> debbugs.gnu.org id=B20739.143351432918110
          (code B ref 20739); Fri, 05 Jun 2015 14:26:01 +0000
Received: (at 20739) by debbugs.gnu.org; 5 Jun 2015 14:25:29 +0000
Received: from localhost ([127.0.0.1]:41871 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z0sYq-0004i1-Tw
	for submit <at> debbugs.gnu.org; Fri, 05 Jun 2015 10:25:29 -0400
Received: from mtaout29.012.net.il ([80.179.55.185]:34167)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Z0sYn-0004hl-EO
 for 20739 <at> debbugs.gnu.org; Fri, 05 Jun 2015 10:25:26 -0400
Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il
 (HyperSendmail v2007.08) id <0NPH00O0067IKO00@HIDDEN> for
 20739 <at> debbugs.gnu.org; Fri, 05 Jun 2015 17:24:40 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NPH00NDO6P4CR40@HIDDEN>; Fri, 05 Jun 2015 17:24:40 +0300 (IDT)
Date: Fri, 05 Jun 2015 17:25:15 +0300
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <3362479c-11a3-4559-88d6-666f03933440@default>
X-012-Sender: halo1@HIDDEN
Message-id: <831thqp704.fsf@HIDDEN>
References: <3362479c-11a3-4559-88d6-666f03933440@default>
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Fri, 5 Jun 2015 01:34:40 -0700 (PDT)
> From: Drew Adams <drew.adams@HIDDEN>
> 
> emacs -Q
> 
> Given two files whose names are a.el and b.el, with b.el more recent
> than a.el.
> 
> M-: (dired '("foo" "a.el" "b.el") "-lstF")
> 
> The files are listed in alphabetic order, not by date as specified by
> arg SWITCHES and as indicated in the mode line.
> 
> Hitting `s' any number of times has no effect on the order of the
> files.  But it updates the mode line in a misleading way, saying
> alternately that the files are ordered by dated.

Isn't this bug#16533?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50;	Dired switches have no effect when explicit list of files provided
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 05 Jun 2015 14:57:01 +0000
Resent-Message-ID: <handler.20739.B20739.143351617420928 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 20739 <at> debbugs.gnu.org
Received: via spool by 20739-submit <at> debbugs.gnu.org id=B20739.143351617420928
          (code B ref 20739); Fri, 05 Jun 2015 14:57:01 +0000
Received: (at 20739) by debbugs.gnu.org; 5 Jun 2015 14:56:14 +0000
Received: from localhost ([127.0.0.1]:41913 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z0t2b-0005RU-UI
	for submit <at> debbugs.gnu.org; Fri, 05 Jun 2015 10:56:14 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:22868)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1Z0t2Z-0005RE-ID
 for 20739 <at> debbugs.gnu.org; Fri, 05 Jun 2015 10:56:12 -0400
Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 t55Eu32s032440
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Fri, 5 Jun 2015 14:56:04 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t55Eu3oY011810
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
 Fri, 5 Jun 2015 14:56:03 GMT
Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9])
 by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t55Eu3PZ025972;
 Fri, 5 Jun 2015 14:56:03 GMT
MIME-Version: 1.0
Message-ID: <c99ede23-1d6c-45a6-845d-447ee1bc8a8f@default>
Date: Fri, 5 Jun 2015 07:56:02 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
References: <<3362479c-11a3-4559-88d6-666f03933440@default>>
 <<831thqp704.fsf@HIDDEN>>
In-Reply-To: <<831thqp704.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: userv0021.oracle.com [156.151.31.71]
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> Isn't this bug#16533?

I don't know, but I don't think so, after reading that bug thread.

FWIW, in my case the same problem holds for Emacs 24.1.  My impression
from the #16533 thread is that that bug was introduced sometime after
24.1 (but that's not clear to me).

The value of `dired-actual-switches' does get changed, in my case.
For example, in the build for which I reported this bug it gets changed
from "-alF" to "-alFt".  And in Emacs 24.1 it gets changed to "-alF -t".

And the mode line indication does change correctly.  But the file order
does not change - the order is still by file name.

Note that the case I reported is where Dired is reporting about an
explicit list of files, i.e., the DIRNAME argument to `dired' is a
cons, e.g., ("the-Dired-buffer-name" FILE1 FILE2...).  The Dired
listing seems to always show the files in the same order as they
appear in this argument, regardless of `dired-actual-switches'.




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 5 Jun 2015 18:03:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 05 14:03:46 2015
Received: from localhost ([127.0.0.1]:42062 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z0vy6-0001RH-AJ
	for submit <at> debbugs.gnu.org; Fri, 05 Jun 2015 14:03:46 -0400
Received: from fencepost.gnu.org ([208.118.235.10]:50096 ident=Debian-exim)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rgm@HIDDEN>) id 1Z0vy4-0001R7-Ck
 for control <at> debbugs.gnu.org; Fri, 05 Jun 2015 14:03:45 -0400
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>) id 1Z0vy3-0000i8-U4
 for control <at> debbugs.gnu.org; Fri, 05 Jun 2015 14:03:43 -0400
Subject: control message for bug 20739
To: <control <at> debbugs.gnu.org>
X-Mailer: mail (GNU Mailutils 2.99.98)
Message-Id: <E1Z0vy3-0000i8-U4@HIDDEN>
From: Glenn Morris <rgm@HIDDEN>
Date: Fri, 05 Jun 2015 14:03:43 -0400
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

merge 952 20739




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50; Dired switches have no effect when explicit list of files provided
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 06 Jun 2015 09:37:01 +0000
Resent-Message-ID: <handler.20739.B20739.143358340229531 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Drew Adams <drew.adams@HIDDEN>
Cc: 20739 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 20739-submit <at> debbugs.gnu.org id=B20739.143358340229531
          (code B ref 20739); Sat, 06 Jun 2015 09:37:01 +0000
Received: (at 20739) by debbugs.gnu.org; 6 Jun 2015 09:36:42 +0000
Received: from localhost ([127.0.0.1]:42552 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1AWv-0007gE-Pt
	for submit <at> debbugs.gnu.org; Sat, 06 Jun 2015 05:36:42 -0400
Received: from mtaout22.012.net.il ([80.179.55.172]:53132)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Z1AWt-0007fz-8u
 for 20739 <at> debbugs.gnu.org; Sat, 06 Jun 2015 05:36:40 -0400
Received: from conversion-daemon.a-mtaout22.012.net.il by
 a-mtaout22.012.net.il (HyperSendmail v2007.08) id
 <0NPI00600NGUIX00@HIDDEN> for 20739 <at> debbugs.gnu.org;
 Sat, 06 Jun 2015 12:36:32 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NPI006T2O0WKZ20@HIDDEN>;
 Sat, 06 Jun 2015 12:36:32 +0300 (IDT)
Date: Sat, 06 Jun 2015 12:36:31 +0300
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <3362479c-11a3-4559-88d6-666f03933440@default>
X-012-Sender: halo1@HIDDEN
Message-id: <837frhnppc.fsf@HIDDEN>
References: <3362479c-11a3-4559-88d6-666f03933440@default>
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Fri, 5 Jun 2015 01:34:40 -0700 (PDT)
> From: Drew Adams <drew.adams@HIDDEN>
> 
> emacs -Q
> 
> Given two files whose names are a.el and b.el, with b.el more recent
> than a.el.
> 
> M-: (dired '("foo" "a.el" "b.el") "-lstF")
> 
> The files are listed in alphabetic order, not by date as specified by
> arg SWITCHES and as indicated in the mode line.

No, they are listed in the order in which you specified them in the
list passed as the first argument to 'dired'.  That just happened to
coincide with alphabetic order in your case.

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'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.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50;	Dired switches have no effect when explicit list of files provided
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 06 Jun 2015 18:44:02 +0000
Resent-Message-ID: <handler.20739.B20739.143361620922978 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 20739 <at> debbugs.gnu.org
Received: via spool by 20739-submit <at> debbugs.gnu.org id=B20739.143361620922978
          (code B ref 20739); Sat, 06 Jun 2015 18:44:02 +0000
Received: (at 20739) by debbugs.gnu.org; 6 Jun 2015 18:43:29 +0000
Received: from localhost ([127.0.0.1]:43468 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1J44-0005yY-Jo
	for submit <at> debbugs.gnu.org; Sat, 06 Jun 2015 14:43:29 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:35187)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1Z1J41-0005yJ-4Y
 for 20739 <at> debbugs.gnu.org; Sat, 06 Jun 2015 14:43:26 -0400
Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 t56IhJFF005960
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Sat, 6 Jun 2015 18:43:19 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t56IhICJ009255
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
 Sat, 6 Jun 2015 18:43:18 GMT
Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24])
 by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t56IhIrr016343;
 Sat, 6 Jun 2015 18:43:18 GMT
MIME-Version: 1.0
Message-ID: <f0b49ecc-7301-4ec9-b339-a3f8a65c553c@default>
Date: Sat, 6 Jun 2015 11:43:20 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
References: <<3362479c-11a3-4559-88d6-666f03933440@default>>
 <<837frhnppc.fsf@HIDDEN>>
In-Reply-To: <<837frhnppc.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: userv0021.oracle.com [156.151.31.71]
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> they are listed in the order in which you specified them in the list
> passed as the first argument to 'dired'.  That just happened to
> coincide with alphabetic order in your case.

Right.  I misspoke.

> 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.

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?

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.  That makes sense, to me anyway.

We should be able to easily make Dired at least report correctly
about the switches behavior that it gets right, and make it tell
users not to expect other switches to have any effect in this
use case.

> I've updated the doc string to mention this peculiarity.
>=20
> > Hitting `s' any number of times has no effect on the order of the
> > files.
>=20
> 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.

And either the list of those that are useful (not ignored) should
be given explicitly (but that can be platform-dependent), or at
least a couple examples that are typically relevant can be given.

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.

Here is one possibility for the mode-line lighter: `Dired/*-hiF'.
Here, I'm using:

* "*" to indicate listing selected files instead of a directory.

* "-hiF" are the relevant `ls' switches.  (Irrelevant switches
  given by the user are ignored - this indicates which are used.)

* "/" instead of "by ".  So `Dired/name' and `Dired/date'.

  FWIW: I do this /-for-by replacement anyway in my code, to save
  space and because I add more info to the lighter than just the
  sort order.  When files are marked or flagged I add that info
  to the lighter.  E.g., `Dired/name 3* 2D', with the `3*' and
  the `2D' highlighted using,by default, the same faces as marks
  `*' and `D'.

  If the current line is marked/flagged, then the lighter shows
  how many are, both through that line and total.  For example,
  `Dired/date 6* 2/9D' says this: There are 6 marked lines
  and 9 flagged lines; the file on the current line is flagged;
  there is one flagged above it and there are 8 flagged below it.

That's just one possibility, for discussion.  `*' is maybe not
the best indicator of an explicit listing; dunno.  And maybe
it won't be easy to always correctly get the list of relevant
switches; dunno.

FYI - The code for the mode-line indicator that I use now (e.g.,
showing number of marks and flags) is in function
`diredp-nb-marked-in-mode-name', in `dired+.el'.  It could be
added to vanilla dired.el, if wanted.  In dired+.el, that function
is added to these hooks:

(add-hook 'dired-after-readin-hook 'diredp-nb-marked-in-mode-name)
;; `find-dired' does not call `dired-readin'.
(add-hook 'dired-mode-hook         'diredp-nb-marked-in-mode-name)

Here is the code for the function.

(defun diredp-nb-marked-in-mode-name ()
  "Add number of marked and flagged lines to mode name in the mode line.
\(Flagged means flagged for deletion.)
If the current line is marked/flagged and there are others
marked/flagged after it then show `N/M', where N is the number
marked/flagged through the current line and M is the total number
marked/flagged.

Also abbreviate `mode-name', using \"Dired/\" instead of \"Dired by\"."
  (let ((mname  (format-mode-line mode-name)))
    ;; Prop `dired+-mode-name' indicates whether `mode-name' was changed.
    (unless (get-text-property 0 'dired+-mode-name mname)
      (save-match-data
        (setq mode-name
              `(,(propertize
                  (if (string-match "^[dD]ired \\(by \\)?\\(.*\\)" mname)
                      (format "Dired/%s" (match-string 2 mname))
                    mname)
                  'dired+-mode-name t)
                 (:eval
                  (let* ((dired-marker-char
                          (if (eq ?D dired-marker-char)
                              ?*
                            dired-marker-char))
                         (marked-regexp (dired-marker-regexp))
                         (nb-marked
                          (count-matches
                           marked-regexp (point-min) (point-max))))
                    (if (not (> nb-marked 0))
                        ""
                      (propertize
                       (format
                        " %s%d%c"
                        (save-excursion
                          (forward-line 0)
                          (if (looking-at (concat marked-regexp ".*"))
                              (format "%d/" (1+ (count-matches
                                                 marked-regexp
                                                 (point-min) (point))))
                            ""))
                        nb-marked dired-marker-char)
                       'face 'diredp-mode-line-marked
                       'dired+-mode-name t))))
                 (:eval
                  (let* ((flagged-regexp
                          (let ((dired-marker-char  dired-del-marker))
                            (dired-marker-regexp)))
                         (nb-flagged
                          (count-matches
                           flagged-regexp (point-min) (point-max))))
                    (if (not (> nb-flagged 0))
                        ""
                      (propertize
                       (format
                        " %s%dD"
                        (save-excursion
                          (forward-line 0)
                          (if (looking-at (concat flagged-regexp ".*"))
                              (format "%d/" (1+ (count-matches
                                                 flagged-regexp
                                                 (point-min) (point))))
                            ""))
                        nb-flagged)
                       'face 'diredp-mode-line-flagged))))))))))




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50; Dired switches have no effect when explicit list of files provided
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 06 Jun 2015 19:28:01 +0000
Resent-Message-ID: <handler.20739.B20739.143361886527079 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Drew Adams <drew.adams@HIDDEN>
Cc: 20739 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 20739-submit <at> debbugs.gnu.org id=B20739.143361886527079
          (code B ref 20739); Sat, 06 Jun 2015 19:28:01 +0000
Received: (at 20739) by debbugs.gnu.org; 6 Jun 2015 19:27:45 +0000
Received: from localhost ([127.0.0.1]:43495 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1Jku-00072g-J6
	for submit <at> debbugs.gnu.org; Sat, 06 Jun 2015 15:27:45 -0400
Received: from mtaout21.012.net.il ([80.179.55.169]:38134)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Z1Jks-00072S-CS
 for 20739 <at> debbugs.gnu.org; Sat, 06 Jun 2015 15:27:43 -0400
Received: from conversion-daemon.a-mtaout21.012.net.il by
 a-mtaout21.012.net.il (HyperSendmail v2007.08) id
 <0NPJ00C00EKFIL00@HIDDEN> for 20739 <at> debbugs.gnu.org;
 Sat, 06 Jun 2015 22:27:35 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NPJ00C3IFDZHV60@HIDDEN>;
 Sat, 06 Jun 2015 22:27:35 +0300 (IDT)
Date: Sat, 06 Jun 2015 22:27:35 +0300
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <f0b49ecc-7301-4ec9-b339-a3f8a65c553c@default>
X-012-Sender: halo1@HIDDEN
Message-id: <83oaksmyc8.fsf@HIDDEN>
References: <f0b49ecc-7301-4ec9-b339-a3f8a65c553c@default>
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Sat, 6 Jun 2015 11:43:20 -0700 (PDT)
> From: Drew Adams <drew.adams@HIDDEN>
> Cc: 20739 <at> 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.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50;	Dired switches have no effect when explicit list of files provided
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 06 Jun 2015 21:58:02 +0000
Resent-Message-ID: <handler.20739.B20739.143362783314323 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 20739 <at> debbugs.gnu.org
Received: via spool by 20739-submit <at> debbugs.gnu.org id=B20739.143362783314323
          (code B ref 20739); Sat, 06 Jun 2015 21:58:02 +0000
Received: (at 20739) by debbugs.gnu.org; 6 Jun 2015 21:57:13 +0000
Received: from localhost ([127.0.0.1]:43537 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1M5Y-0003iw-K9
	for submit <at> debbugs.gnu.org; Sat, 06 Jun 2015 17:57:13 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:35433)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1Z1M5W-0003ig-Nd
 for 20739 <at> debbugs.gnu.org; Sat, 06 Jun 2015 17:57:11 -0400
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 t56Lv3l1006104
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Sat, 6 Jun 2015 21:57:04 GMT
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 t56Lv3qn028870
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
 Sat, 6 Jun 2015 21:57:03 GMT
Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24])
 by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t56Lv3vt024980;
 Sat, 6 Jun 2015 21:57:03 GMT
MIME-Version: 1.0
Message-ID: <f33db93f-7f6c-4aee-90e4-566d7e93b228@default>
Date: Sat, 6 Jun 2015 14:57:05 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
References: <<f0b49ecc-7301-4ec9-b339-a3f8a65c553c@default>>
 <<83oaksmyc8.fsf@HIDDEN>>
In-Reply-To: <<83oaksmyc8.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> > 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.
>=20
> Yes.
>=20
> > 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.
>=20
> 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.

It is not about the order.  `r' works, for example - it reverses
the order.

And anyway I don't think that sort-order switches are the only
ones that are ignored/irrelevant when DIRNAME is a cons.

It's not about switches that control the order.  It's about switches
that deal with directory (or directories) themselves, their entire
contents, as opposed to switches that deal only with an individual
entry to be listed or that (like `r') deal only with the set of
entries without needing any knowledge of the directory.

On MS Windows `ls-lisp.el' is used, and it says that it supports
all of these switches: A a B C c F G g h i n R r S s t U u v X

I think that besides `t' and the other sort switches (besides `r'),
at least `A', `a', `B', and `C' have no effect.

BTW, I see a bug for `B':

(dired-other-window '("foo" "toto.el" "foo.el") "-B")

The problem is at the beginning of `ls-lisp-insert-directory, AFAICT.
There we see this code on the first line:

(if (or wildcard-regexp full-directory-p)

But that is incorrect, because when switch `B' is used
we do this (ugly hack) in `ls-lisp--insert-directory':

(if (memq ?B switches) (setq wildcard-regexp "[^~]\\'"))

and this, similarly:

(setq wildcard-regexp (if (memq ?B switches) "[^~]\\'")
      file            (file-relative-name orig-file))

IOW, we use a pseudo wildcard-regexp.

And that doesn't work with this call:
(directory-files-and-attributes
  dir nil wildcard-regexp t (if (memq ?n switches) 'integer 'string))

Debugger entered--Lisp error: (file-error "Opening directory"
 "No such file or directory" "d:/the/path/to/foo.el/foo.el/")
  directory-files-and-attributes("foo.el/" nil "[^~]\\'" t string)
  ls-lisp-insert-directory("foo.el" (66) nil "[^~]\\'" nil)
  ls-lisp--insert-directory(...

If I change the (if (or wildcard-regexp full-directory-p) to this
then it seems to fix the problem of raising an error:

 (if (or (and wildcard-regexp
              (not (string=3D "[^~]\\'" wildcard-regexp)))
         full-directory-p)

But that is not a complete fix.  It does not solve the
problem that `B' does not work for a cons DIRNAME. =20

I'm not sure what the right fix is for that, since it's not
clear to me where switch `-B' is handled.  A guess is that
for a whole directory (not for a cons DIRNAME or for a non-dir
filename) it is handled by `directory-files-and-attributes'.
And I'm guessing that that function should still (after a fix)
be called only for the non-cons DIRNAME case.

In that case, I'm guessing that `ls-lisp-insert-directory'
should test for the pseudo wildcards-regexp "[^~]\\'" and
should then DTRT to list the entry showing the block size.
Maybe you can take a look at what that code should be.

Of course, we can just implement the fix I described above,
to prevent an error being raised, and document that `-B' is
not supported for cons DIRNAME.  It would be better to make
it DTRT, however.  This switch needs only to consider a
single file or dir name entry, so it should be possible to
support it.

[BTW, `g' and `n' are listed as supported, but the ls-lisp doc
says that `l' is always assumed (cannot be overridden), so I
don't think `g' or `n' is really supported (`g' is supposed to
be like `l' but does now show owner; `n' is supposed to show
numeric user and group ids).  At least I don't see `g' and `n'
having any effect.  Perhaps this is an ls-lisp.el bug?]

IOW, the switches that correspond to your "Yes" agreement,
above, have no effect when DIRNAME is a cons.

> > 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.
>=20
> 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.

It is not about the `s' toggle.  It is about switches.  There are
multiple switches that are currently not supported for cons DIRNAME,
including but not limited to most of the switches that handle sort
order.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50; Dired switches have no effect when explicit list of files provided
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 06 Jun 2015 22:22:02 +0000
Resent-Message-ID: <handler.20739.B20739.143362930216527 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 20739 <at> debbugs.gnu.org
Received: via spool by 20739-submit <at> debbugs.gnu.org id=B20739.143362930216527
          (code B ref 20739); Sat, 06 Jun 2015 22:22:02 +0000
Received: (at 20739) by debbugs.gnu.org; 6 Jun 2015 22:21:42 +0000
Received: from localhost ([127.0.0.1]:43554 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1MTF-0004IU-Ni
	for submit <at> debbugs.gnu.org; Sat, 06 Jun 2015 18:21:42 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:19482)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1Z1MTC-0004IF-Te
 for 20739 <at> debbugs.gnu.org; Sat, 06 Jun 2015 18:21:39 -0400
Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 t56MLW3s030196
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Sat, 6 Jun 2015 22:21:32 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by userv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t56MLU9J003735
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
 Sat, 6 Jun 2015 22:21:32 GMT
Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24])
 by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t56MLUpE027722;
 Sat, 6 Jun 2015 22:21:30 GMT
MIME-Version: 1.0
Message-ID: <c829ddc5-9628-4990-9e33-6992f2b8b952@default>
Date: Sat, 6 Jun 2015 15:21:32 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
References: <<f0b49ecc-7301-4ec9-b339-a3f8a65c553c@default>>
 <<83oaksmyc8.fsf@HIDDEN>> <f33db93f-7f6c-4aee-90e4-566d7e93b228@default>
In-Reply-To: <f33db93f-7f6c-4aee-90e4-566d7e93b228@default>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: userv0022.oracle.com [156.151.31.74]
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Sorry; what I said about switch -B was correct, except about it
showing block sizes.  I should have said that it filters out
backup files.

The rest of what I said about should be OK.  In particular, the
fix I showed, that lets a cons DIRNAME not raise an error with
-B, still does not solve the problem that -B does not work here.
That is, no error is raised, but backup files are not filtered
out.=20




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50; Dired switches have no effect when explicit list of files provided
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 07 Jun 2015 14:41:03 +0000
Resent-Message-ID: <handler.20739.B20739.143368803110983 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Drew Adams <drew.adams@HIDDEN>
Cc: 20739 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 20739-submit <at> debbugs.gnu.org id=B20739.143368803110983
          (code B ref 20739); Sun, 07 Jun 2015 14:41:03 +0000
Received: (at 20739) by debbugs.gnu.org; 7 Jun 2015 14:40:31 +0000
Received: from localhost ([127.0.0.1]:44174 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1bkT-0002r3-PH
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2015 10:40:30 -0400
Received: from mtaout25.012.net.il ([80.179.55.181]:33355)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Z1bkQ-0002qd-Pd
 for 20739 <at> debbugs.gnu.org; Sun, 07 Jun 2015 10:40:27 -0400
Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il
 (HyperSendmail v2007.08) id <0NPK00100WAH7W00@HIDDEN> for
 20739 <at> debbugs.gnu.org; Sun, 07 Jun 2015 17:35:43 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NPK00PMVWJJ8K20@HIDDEN>; Sun, 07 Jun 2015 17:35:43 +0300 (IDT)
Date: Sun, 07 Jun 2015 17:39:40 +0300
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <f33db93f-7f6c-4aee-90e4-566d7e93b228@default>
X-012-Sender: halo1@HIDDEN
Message-id: <83fv63mvkj.fsf@HIDDEN>
References: <f0b49ecc-7301-4ec9-b339-a3f8a65c553c@default>
 <83oaksmyc8.fsf@HIDDEN> <f33db93f-7f6c-4aee-90e4-566d7e93b228@default>
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Sat, 6 Jun 2015 14:57:05 -0700 (PDT)
> From: Drew Adams <drew.adams@HIDDEN>
> Cc: 20739 <at> debbugs.gnu.org
> 
> > > 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.
> 
> It is not about the order.  `r' works, for example - it reverses
> the order.

No, it doesn't.  The order is always the same as in the list you pass
to 'dired'.

> And anyway I don't think that sort-order switches are the only
> ones that are ignored/irrelevant when DIRNAME is a cons.

Which other switches are ignored?

> It's not about switches that control the order.  It's about switches
> that deal with directory (or directories) themselves, their entire
> contents, as opposed to switches that deal only with an individual
> entry to be listed or that (like `r') deal only with the set of
> entries without needing any knowledge of the directory.

Yes, and those are all the switches that control the order of
presenting the files in the listing.

> On MS Windows `ls-lisp.el' is used, and it says that it supports
> all of these switches: A a B C c F G g h i n R r S s t U u v X
> 
> I think that besides `t' and the other sort switches (besides `r'),
> at least `A', `a', `B', and `C' have no effect.

"-C" is about the order; the others are meaningless when you specify
the files explicitly.  The doc string already says that the list of
files to display is specified by the 1st argument in this case.

So I think the current doc string, after yesterday's changes, fixes
the issues you raised.

Your other points are specific to ls-lisp.el, so they don't really
belong to this bug report, IMO.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50;	Dired switches have no effect when explicit list of files provided
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 07 Jun 2015 17:35:03 +0000
Resent-Message-ID: <handler.20739.B20739.14336984691305 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 20739 <at> debbugs.gnu.org
Received: via spool by 20739-submit <at> debbugs.gnu.org id=B20739.14336984691305
          (code B ref 20739); Sun, 07 Jun 2015 17:35:03 +0000
Received: (at 20739) by debbugs.gnu.org; 7 Jun 2015 17:34:29 +0000
Received: from localhost ([127.0.0.1]:44226 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1eSq-0000Ky-I1
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2015 13:34:29 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:22619)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1Z1eSn-0000Kk-KF
 for 20739 <at> debbugs.gnu.org; Sun, 07 Jun 2015 13:34:26 -0400
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 t57HYJai027380
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Sun, 7 Jun 2015 17:34:19 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t57HYIkw005954
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
 Sun, 7 Jun 2015 17:34:18 GMT
Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11])
 by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t57HYHeX018644;
 Sun, 7 Jun 2015 17:34:17 GMT
MIME-Version: 1.0
Message-ID: <186494c2-6958-42eb-a351-6543237bfb75@default>
Date: Sun, 7 Jun 2015 10:34:18 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
References: <<f0b49ecc-7301-4ec9-b339-a3f8a65c553c@default>>
 <<83oaksmyc8.fsf@HIDDEN>> <<f33db93f-7f6c-4aee-90e4-566d7e93b228@default>>
 <<83fv63mvkj.fsf@HIDDEN>>
In-Reply-To: <<83fv63mvkj.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> > > 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. =20
> > > I think this makes the actual behavior clear enough.
> >
> > It is not about the order.  `r' works, for example - it reverses
> > the order.
>=20
> No, it doesn't.  The order is always the same as in the list you
> pass to 'dired'.

That's not what I see.

(dired ("foo" "/path/to/bbbbb" "/path/to/foo.el" "/path/to/bar.el")
       "-alFr")

shows the files in Dired in the reverse order: bar.el, foo.el,
bbbbb.  Switch -r, even though it is about the sort order, works
fine with a cons DIRNAME.  Here anyway (with emacs -Q).
    =20
> > And anyway I don't think that sort-order switches are the only
> > ones that are ignored/irrelevant when DIRNAME is a cons.
>=20
> Which other switches are ignored?
>=20
> > It's not about switches that control the order.  It's about
> > switches that deal with directory (or directories) themselves,
> > their entire contents, as opposed to switches that deal only
> > with an individual entry to be listed or that (like `r') deal
> > only with the set of entries without needing any knowledge of
> > the directory.
>=20
> Yes, and those are all the switches that control the order of
> presenting the files in the listing.

I don't agree.  Unless you are interpreting "switches that control
the order" as including any switch that affects the display.

You say that -C, for instance, "controls the order".  At least
here (I'm using Cygwin), -C lists the entries by columns.  It
does not change/control the order.

And (here anyway), -C has no effect with a cons DIRNAME: With
string DIRNAME, -C lists only the file names.  With cons DIRNAME,
the -C shows a full listing of fields, not just file names.

> > On MS Windows `ls-lisp.el' is used, and it says that it supports
> > all of these switches: A a B C c F G g h i n R r S s t U u v X
> >
> > I think that besides `t' and the other sort switches (besides
> > `r'), at least `A', `a', `B', and `C' have no effect.
>=20
> "-C" is about the order; the others are meaningless when you specify
> the files explicitly.

Whether -A, -a, and -B are meaningless is in the eye of the user.
The point is that if you specify an explicit . or .., switch -A
still lists those directories.  And switch -a still lists dot files
that are in the explicit list.  And switch -B still lists backup
files that are in the list.  Such behavior means that those
switches have no effect when DIRNAME is a cons.  And they have
nothing to do with sort order.  And each could be made to work,
I think: they require no knowledge of the directory; they just
filter the input file names.

> The doc string already says that the list of
> files to display is specified by the 1st argument in this case.
>=20
> So I think the current doc string, after yesterday's changes, fixes
> the issues you raised.

I don't have that doc string, but I'll take your word for it,
modulo what I've noted above.  A user should not get the
impression that switches such as -A, -a, and -B work, even
though they are not about controlling the sort order.  IMO, it
is not about sort order.

> Your other points are specific to ls-lisp.el,

No, they are not.  The mode-line lighter, for instance, has
nothing to do with ls-lisp.  It is incorrect for the lighter
to indicate the order as being "by name" or "by date" when
it is not.

> so they don't really belong to this bug report, IMO.

Why do you think that what is controlled by the ls-lisp.el code
has nothing to do with this bug report?

The bug is about certain Dired switches having no effect when
DIRNAME is a cons, even though they could work (have the usual
effect).

It is about fixing that no-effect behavior and documenting the
no-effect behavior for the remaining switches that are meaningful
only for a directory.  The switches that need to be fixed are
those that could apply to an explicit set of files and dirs.

The fact that the ls-lisp code for -B does not work, and that
it raises an error, is part of this bug.  I proposed a simple
fix for the erroneous error raising.  Why not apply it?  And
why not eventually fix the problem completely, so that -B is
supported?  There is no reason not to support it, IMO.  If
there is a lack of resources, then let's keep the bug open
until someone steps up.  But the error-raising part of the
problem can be fixed now, trivially.

That's what this bug is about: fixing the fact that some
switches that could be effective with a DIRNAME cons are
currently ineffective.  And fixing the doc so that whatever
the behavior is with a cons DIRNAME, it is clearly described.
It sounds like you have worked on the latter part, which is
great.  Thanks for that.





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50; Dired switches have no effect when explicit list of files provided
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 07 Jun 2015 19:10:04 +0000
Resent-Message-ID: <handler.20739.B20739.143370419726904 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Drew Adams <drew.adams@HIDDEN>
Cc: 20739 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 20739-submit <at> debbugs.gnu.org id=B20739.143370419726904
          (code B ref 20739); Sun, 07 Jun 2015 19:10:04 +0000
Received: (at 20739) by debbugs.gnu.org; 7 Jun 2015 19:09:57 +0000
Received: from localhost ([127.0.0.1]:44312 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1fxE-0006zs-3b
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2015 15:09:56 -0400
Received: from mtaout22.012.net.il ([80.179.55.172]:56777)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Z1fxB-0006zd-2b
 for 20739 <at> debbugs.gnu.org; Sun, 07 Jun 2015 15:09:54 -0400
Received: from conversion-daemon.a-mtaout22.012.net.il by
 a-mtaout22.012.net.il (HyperSendmail v2007.08) id
 <0NPL00M008UKHO00@HIDDEN> for 20739 <at> debbugs.gnu.org;
 Sun, 07 Jun 2015 22:09:46 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NPL00M0I98ACC50@HIDDEN>;
 Sun, 07 Jun 2015 22:09:46 +0300 (IDT)
Date: Sun, 07 Jun 2015 22:09:31 +0300
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <186494c2-6958-42eb-a351-6543237bfb75@default>
X-012-Sender: halo1@HIDDEN
Message-id: <838ubvmj2s.fsf@HIDDEN>
References: <186494c2-6958-42eb-a351-6543237bfb75@default>
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Sun, 7 Jun 2015 10:34:18 -0700 (PDT)
> From: Drew Adams <drew.adams@HIDDEN>
> Cc: 20739 <at> debbugs.gnu.org
> 
> > > > 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.
> > >
> > > It is not about the order.  `r' works, for example - it reverses
> > > the order.
> > 
> > No, it doesn't.  The order is always the same as in the list you
> > pass to 'dired'.
> 
> That's not what I see.
> 
> (dired ("foo" "/path/to/bbbbb" "/path/to/foo.el" "/path/to/bar.el")
>        "-alFr")
> 
> shows the files in Dired in the reverse order: bar.el, foo.el,
> bbbbb.

Not in my Emacs, built from the latest development sources.

> > > It's not about switches that control the order.  It's about
> > > switches that deal with directory (or directories) themselves,
> > > their entire contents, as opposed to switches that deal only
> > > with an individual entry to be listed or that (like `r') deal
> > > only with the set of entries without needing any knowledge of
> > > the directory.
> > 
> > Yes, and those are all the switches that control the order of
> > presenting the files in the listing.
> 
> I don't agree.  Unless you are interpreting "switches that control
> the order" as including any switch that affects the display.

I do.

> You say that -C, for instance, "controls the order".  At least
> here (I'm using Cygwin), -C lists the entries by columns.  It
> does not change/control the order.

It shows them in column-wise order.

> > "-C" is about the order; the others are meaningless when you specify
> > the files explicitly.
> 
> Whether -A, -a, and -B are meaningless is in the eye of the user.
> The point is that if you specify an explicit . or .., switch -A
> still lists those directories.

They are also shown without -A or -a.  Specifying any files lists them
regardless.

> Why do you think that what is controlled by the ls-lisp.el code
> has nothing to do with this bug report?

Because 'dired' the function is not defined in ls-lisp.el, and it
works even without ls-lisp.

> The bug is about certain Dired switches having no effect when
> DIRNAME is a cons, even though they could work (have the usual
> effect).

Exactly.  And they have or don't have effect regardless of ls-lisp.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50;	Dired switches have no effect when explicit list of files provided
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 07 Jun 2015 19:34:02 +0000
Resent-Message-ID: <handler.20739.B20739.143370560929066 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 20739 <at> debbugs.gnu.org
Received: via spool by 20739-submit <at> debbugs.gnu.org id=B20739.143370560929066
          (code B ref 20739); Sun, 07 Jun 2015 19:34:02 +0000
Received: (at 20739) by debbugs.gnu.org; 7 Jun 2015 19:33:29 +0000
Received: from localhost ([127.0.0.1]:44324 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1gK0-0007Yi-0N
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2015 15:33:29 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:36365)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1Z1gJw-0007YT-JP
 for 20739 <at> debbugs.gnu.org; Sun, 07 Jun 2015 15:33:25 -0400
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 t57JXHZu003669
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Sun, 7 Jun 2015 19:33:17 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t57JXF8T025311
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
 Sun, 7 Jun 2015 19:33:17 GMT
Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11])
 by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t57JXF7n011389;
 Sun, 7 Jun 2015 19:33:15 GMT
MIME-Version: 1.0
Message-ID: <99d84238-3b80-4778-a248-7063a7e6b3df@default>
Date: Sun, 7 Jun 2015 12:33:16 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
References: <<186494c2-6958-42eb-a351-6543237bfb75@default>>
 <<838ubvmj2s.fsf@HIDDEN>>
In-Reply-To: <<838ubvmj2s.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> > > > It is not about the order.  `r' works, for example - it
> > > > reverses the order.
> > >
> > > No, it doesn't.  The order is always the same as in the list you
> > > pass to 'dired'.
> >
> > That's not what I see.
> > (dired ("foo" "/path/to/bbbbb" "/path/to/foo.el"
> >         "/path/to/bar.el")
> >        "-alFr")
> > shows the files in Dired in the reverse order: bar.el, foo.el,
> > bbbbb.

(I forgot the quote before the list arg, as I'm sure you realized.)

> 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
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=3D/mingw32 --host=3Di686-pc-mingw32
 --enable-checking=3Dyes,glyphs'

> > > Yes, and those are all the switches that control the order of
> > > presenting the files in the listing.
> >
> > I don't agree.  Unless you are interpreting "switches that control
> > the order" as including any switch that affects the display.
>=20
> I do.

An odd interpretation of sort order.  If the doc relies on users
understanding things that way then I'd suggest that it won't
work as intended. ;-)

> > You say that -C, for instance, "controls the order".  At least
> > here (I'm using Cygwin), -C lists the entries by columns.  It
> > does not change/control the order.
>=20
> It shows them in column-wise order.

What does that even mean?  The order of the files listed is
unchanged from the input order in DIRNAME.  What is changed
(removed) is the display of fields besides the file/dir name.

> > > the others are meaningless when you specify the files explicitly.
> >
> > Whether -A, -a, and -B are meaningless is in the eye of the user.
> > The point is that if you specify an explicit . or .., switch -A
> > still lists those directories.
>=20
> They are also shown without -A or -a.  Specifying any files lists
> them regardless.

Which is just another way of saying that -A and -a do not remove
those dot names.  We are agreeing about the effect, but not about
what it means.  IMO, it means that these switches do not do what
they say.  In your opinion (I guess) they do what they say, because
a user must understand what they say to mean that they do not
do what they explicitly in this case, i.e., they do not remove .
and ...

> > Why do you think that what is controlled by the ls-lisp.el code
> > has nothing to do with this bug report?
>=20
> Because 'dired' the function is not defined in ls-lisp.el, and it
> works even without ls-lisp.

On MS Windows (my report is from a Windows build) it uses ls-lisp
by default, no?  The manual says this:

 Dired normally uses the external program `ls' to produce the directory
 listing displayed in Dired buffers (*note Dired::).  However,
 MS-Windows and MS-DOS systems don't come with such a program, although
 several ports of GNU `ls' are available.  Therefore, Emacs on those
 systems _emulates_ `ls' in Lisp, by using the `ls-lisp.el' package.
 While `ls-lisp.el' provides a reasonably full emulation of `ls', there
 are some options and features peculiar to that emulation; they are
 described in this section.

And even if it does work in some cases without ls-lisp, my bug
report is about fixing Dired generally, including (explicitly)
when ls-lisp is used.  Why look for some cases where it might
work as a way to claim that there is thus no bug if it does
not work in other cases?  Especially cases that I specifically
reported on from the beginning in the bug report?

> > The bug is about certain Dired switches having no effect when
> > DIRNAME is a cons, even though they could work (have the usual
> > effect).
>=20
> Exactly.  And they have or don't have effect regardless of ls-lisp.

OK, as long as fixing them includes fixing them for ls-lisp.

And I pointed out the particular case of -B, for which it is not
true (AFAIK) that it has or doesn't have "effect regardless of
ls-lisp."  The specific problem I pointed to wrt -B is ls-lisp
only (AFAIK).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50; Dired switches have no effect when explicit list of files provided
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 07 Jun 2015 19:56:02 +0000
Resent-Message-ID: <handler.20739.B20739.143370693230924 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Drew Adams <drew.adams@HIDDEN>
Cc: 20739 <at> debbugs.gnu.org
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Received: via spool by 20739-submit <at> debbugs.gnu.org id=B20739.143370693230924
          (code B ref 20739); Sun, 07 Jun 2015 19:56:02 +0000
Received: (at 20739) by debbugs.gnu.org; 7 Jun 2015 19:55:32 +0000
Received: from localhost ([127.0.0.1]:44337 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1gfK-00082h-Vv
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2015 15:55:31 -0400
Received: from mtaout24.012.net.il ([80.179.55.180]:37659)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1Z1gfH-00082Q-Mw
 for 20739 <at> debbugs.gnu.org; Sun, 07 Jun 2015 15:55:29 -0400
Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il
 (HyperSendmail v2007.08) id <0NPL00H00AYADL00@HIDDEN> for
 20739 <at> debbugs.gnu.org; Sun, 07 Jun 2015 22:47:05 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NPL00HEVAYH0V00@HIDDEN>; Sun, 07 Jun 2015 22:47:05 +0300 (IDT)
Date: Sun, 07 Jun 2015 22:55:05 +0300
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <99d84238-3b80-4778-a248-7063a7e6b3df@default>
X-012-Sender: halo1@HIDDEN
Message-id: <834mmjmgyu.fsf@HIDDEN>
References: <186494c2-6958-42eb-a351-6543237bfb75@default>
 <838ubvmj2s.fsf@HIDDEN> <99d84238-3b80-4778-a248-7063a7e6b3df@default>
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Sun, 7 Jun 2015 12:33:16 -0700 (PDT)
> From: Drew Adams <drew.adams@HIDDEN>
> Cc: 20739 <at> debbugs.gnu.org
> 
> > > > > It is not about the order.  `r' works, for example - it
> > > > > reverses the order.
> > > >
> > > > No, it doesn't.  The order is always the same as in the list you
> > > > pass to 'dired'.
> > >
> > > That's not what I see.
> > > (dired ("foo" "/path/to/bbbbb" "/path/to/foo.el"
> > >         "/path/to/bar.el")
> > >        "-alFr")
> > > shows the files in Dired in the reverse order: bar.el, foo.el,
> > > bbbbb.
> 
> (I forgot the quote before the list arg, as I'm sure you realized.)
> 
> > 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

I tried on 3 different systems, one of them GNU/Linux -- none of them
exhibits the behavior you describe.

> > > > Yes, and those are all the switches that control the order of
> > > > presenting the files in the listing.
> > >
> > > I don't agree.  Unless you are interpreting "switches that control
> > > the order" as including any switch that affects the display.
> > 
> > I do.
> 
> An odd interpretation of sort order.

A very simple interpretation: anything that needs to rearrange the
files in any way, by examining them together as a collection.

> > > > the others are meaningless when you specify the files explicitly.
> > >
> > > Whether -A, -a, and -B are meaningless is in the eye of the user.
> > > The point is that if you specify an explicit . or .., switch -A
> > > still lists those directories.
> > 
> > They are also shown without -A or -a.  Specifying any files lists
> > them regardless.
> 
> Which is just another way of saying that -A and -a do not remove
> those dot names.  We are agreeing about the effect, but not about
> what it means.  IMO, it means that these switches do not do what
> they say.

They don't do anything, because the list of files to display is
specified by the caller.

> > > Why do you think that what is controlled by the ls-lisp.el code
> > > has nothing to do with this bug report?
> > 
> > Because 'dired' the function is not defined in ls-lisp.el, and it
> > works even without ls-lisp.
> 
> On MS Windows (my report is from a Windows build) it uses ls-lisp
> by default, no?

'dired' on MS-Windows _calls_ functions in ls-lisp.el, but is not
implemented there.  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.

Now, can we please stop splitting hair?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50;	Dired switches have no effect when explicit list of files provided
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 08 Jun 2015 01:59:02 +0000
Resent-Message-ID: <handler.20739.B20739.143372873330836 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 20739 <at> debbugs.gnu.org
Received: via spool by 20739-submit <at> debbugs.gnu.org id=B20739.143372873330836
          (code B ref 20739); Mon, 08 Jun 2015 01:59:02 +0000
Received: (at 20739) by debbugs.gnu.org; 8 Jun 2015 01:58:53 +0000
Received: from localhost ([127.0.0.1]:44421 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z1mKy-00081H-2v
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2015 21:58:52 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:26940)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1Z1mKv-000814-VZ
 for 20739 <at> debbugs.gnu.org; Sun, 07 Jun 2015 21:58:50 -0400
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
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
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
MIME-Version: 1.0
Message-ID: <6276d39d-958c-4dae-9223-2ef806a5761e@default>
Date: Sun, 7 Jun 2015 18:58:42 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
References: <<186494c2-6958-42eb-a351-6543237bfb75@default>>
 <<838ubvmj2s.fsf@HIDDEN>> <<99d84238-3b80-4778-a248-7063a7e6b3df@default>>
 <<834mmjmgyu.fsf@HIDDEN>>
In-Reply-To: <<834mmjmgyu.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> > > 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.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#20739: 25.0.50; Dired switches have no effect when explicit list of files provided
Resent-From: Drew Adams <drew.adams@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 09 Jun 2015 15:10:03 +0000
Resent-Message-ID: <handler.20739.B20739.143386257627031 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 20739
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 20739 <at> debbugs.gnu.org
Received: via spool by 20739-submit <at> debbugs.gnu.org id=B20739.143386257627031
          (code B ref 20739); Tue, 09 Jun 2015 15:10:03 +0000
Received: (at 20739) by debbugs.gnu.org; 9 Jun 2015 15:09:36 +0000
Received: from localhost ([127.0.0.1]:46362 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Z2L9j-00071u-Qn
	for submit <at> debbugs.gnu.org; Tue, 09 Jun 2015 11:09:36 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:29146)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1Z2L9i-00071h-1i
 for 20739 <at> debbugs.gnu.org; Tue, 09 Jun 2015 11:09:34 -0400
Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 t59F9Rw4012807
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Tue, 9 Jun 2015 15:09:28 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t59F9RSM013310
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL);
 Tue, 9 Jun 2015 15:09:27 GMT
Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22])
 by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t59F9RVJ015255;
 Tue, 9 Jun 2015 15:09:27 GMT
MIME-Version: 1.0
Message-ID: <4630da58-24e5-45e7-8456-2b637be51394@default>
Date: Tue, 9 Jun 2015 08:09:26 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
References: <<f0b49ecc-7301-4ec9-b339-a3f8a65c553c@default>>
 <<83oaksmyc8.fsf@HIDDEN>> <f33db93f-7f6c-4aee-90e4-566d7e93b228@default>
In-Reply-To: <f33db93f-7f6c-4aee-90e4-566d7e93b228@default>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9  (901082) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0022.oracle.com [141.146.126.234]
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

> a bug for `B':
...
> Debugger entered--Lisp error: (file-error "Opening directory"
>  "No such file or directory" "d:/the/path/to/foo.el/foo.el/")
>   directory-files-and-attributes("foo.el/" nil "[^~]\\'" t string)
>   ls-lisp-insert-directory("foo.el" (66) nil "[^~]\\'" nil)
>   ls-lisp--insert-directory(...

FYI, I submitted the fix as a patch in a separate bug report, #20776.





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.