Subject: bug#714 closed by Chong Yidong <[email-masked]> (Re: directory-files: Doc string is irritatingly vague wrt sorting.)

From: [email-masked] (Emacs bug Tracking System)

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#714: directory-files:  Doc string is irritatingly vague wrt sorting.

It has been closed by Chong Yidong <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Chong Yidong <[email-masked]> by
replying to this email.

-- 
714: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=714
Emacs Bug Tracking System
Contact [email-masked] with problems
>From [email-masked] Fri Aug 15 13:18:23 2008
From: Chong Yidong <[email-masked]>
To: Alan Mackenzie <[email-masked]>
Cc: [email-masked]
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.

>From [email-masked] Wed Aug 13 12:09:49 2008
Date: Wed, 13 Aug 2008 19:11:41 +0000
To: [email-masked]
Subject: directory-files:  Doc string is irritatingly vague wrt sorting.
From: Alan Mackenzie <[email-masked]>

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