GNU bug report logs - #714
directory-files: Doc string is irritatingly vague wrt sorting.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Wed, 13 Aug 2008 19:15:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: Chong Yidong <cyd <at> stupidchicken.com>
Subject: bug#714: marked as done (directory-files:  Doc string is 
 irritatingly vague wrt sorting.)
[Message part 1 (text/plain, inline)]
Your message dated Fri, 15 Aug 2008 16:19:06 -0400
with message-id <877iai8211.fsf <at> cyd.mit.edu>
and subject line Re: directory-files:  Doc string is irritatingly vague wrt sorting.
has caused the Emacs bug report #714,
regarding directory-files:  Doc string is irritatingly vague wrt sorting.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don <at> donarmstrong.com
immediately.)


-- 
714: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=714
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Alan Mackenzie <acm <at> muc.de>
To: bug-gnu-emacs <at> gnu.org
Subject: directory-files:  Doc string is irritatingly vague wrt sorting.
Date: Wed, 13 Aug 2008 19:11:41 +0000
Hi, Emacs!

The doc string for directory files is:

    directory-files is a built-in function in `src/dired.c'.
    (directory-files DIRECTORY &optional FULL MATCH NOSORT)

    Return a list of names of files in DIRECTORY.
    There are three optional arguments:
    If FULL is non-nil, return absolute file names.  Otherwise return names
    that are relative to the specified directory.
    If MATCH is non-nil, mention only file names that match the regexp MATCH.
    If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
     NOSORT is useful if you plan to sort the result yourself.

This sort of implies (but doesn't state) that if NOSORT is nil, the
returned list is sorted.

More importantly, it doesn't state the predicate used for the sorting.
"Obviously", this will be some sort of alphabetical sort, but this gets
complicated for mixed case filenames and (more importantly) for character
sets which aren't vanilla ASCII.

-- 
Alan Mackenzie (Nuremberg, Germany).



[Message part 3 (message/rfc822, inline)]
From: Chong Yidong <cyd <at> stupidchicken.com>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 714-done <at> debbugs.gnu.org
Subject: Re: directory-files:  Doc string is irritatingly vague wrt sorting.
Date: Fri, 15 Aug 2008 16:19:06 -0400
I've clarified the docstring.  Thanks.


This bug report was last modified 16 years and 284 days ago.

Previous Next


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