unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 20739@debbugs.gnu.org
Subject: bug#20739: 25.0.50; Dired switches have no effect when explicit list of files provided
Date: Sun, 7 Jun 2015 18:58:42 -0700 (PDT)	[thread overview]
Message-ID: <6276d39d-958c-4dae-9223-2ef806a5761e@default> (raw)
In-Reply-To: <<834mmjmgyu.fsf@gnu.org>>

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

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





  parent reply	other threads:[~2015-06-08  1:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<186494c2-6958-42eb-a351-6543237bfb75@default>
     [not found] ` <<838ubvmj2s.fsf@gnu.org>
2015-06-07 19:33   ` bug#20739: 25.0.50; Dired switches have no effect when explicit list of files provided Drew Adams
2015-06-07 19:55     ` Eli Zaretskii
     [not found]   ` <<99d84238-3b80-4778-a248-7063a7e6b3df@default>
     [not found]     ` <<834mmjmgyu.fsf@gnu.org>
2015-06-08  1:58       ` Drew Adams [this message]
     [not found] <<f0b49ecc-7301-4ec9-b339-a3f8a65c553c@default>
     [not found] ` <<83oaksmyc8.fsf@gnu.org>
2015-06-06 21:57   ` Drew Adams
2015-06-06 22:21     ` Drew Adams
2015-06-07 14:39     ` Eli Zaretskii
2015-06-09 15:09     ` Drew Adams
     [not found]   ` <<f33db93f-7f6c-4aee-90e4-566d7e93b228@default>
     [not found]     ` <<83fv63mvkj.fsf@gnu.org>
2015-06-07 17:34       ` Drew Adams
2015-06-07 19:09         ` Eli Zaretskii
     [not found] <<3362479c-11a3-4559-88d6-666f03933440@default>
     [not found] ` <<831thqp704.fsf@gnu.org>
2015-06-05 14:56   ` Drew Adams
     [not found] ` <<837frhnppc.fsf@gnu.org>
2015-06-06 18:43   ` Drew Adams
2015-06-06 19:27     ` Eli Zaretskii
2015-06-05  8:34 Drew Adams
2015-06-05 14:25 ` Eli Zaretskii
2015-06-06  9:36 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=6276d39d-958c-4dae-9223-2ef806a5761e@default \
    --to=drew.adams@oracle.com \
    --cc=20739@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).