From unknown Mon Aug 18 09:00:40 2025 X-Loop: don@donarmstrong.com Subject: bug#714: directory-files: Doc string is irritatingly vague wrt sorting. Reply-To: Alan Mackenzie , 714@debbugs.gnu.org Resent-From: Alan Mackenzie Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 13 Aug 2008 19:15:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 714 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.121865459019042 (code B ref -1); Wed, 13 Aug 2008 19:15:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.8 required=4.0 tests=AWL,BAYES_00,FOURLA, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 13 Aug 2008 19:09:50 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7DJ9jMp018970 for ; Wed, 13 Aug 2008 12:09:47 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KTLj5-0005Zy-Ds for bug-gnu-emacs@gnu.org; Wed, 13 Aug 2008 15:09:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KTLj3-0005YX-KH for bug-gnu-emacs@gnu.org; Wed, 13 Aug 2008 15:09:42 -0400 Received: from [199.232.76.173] (port=57898 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTLj3-0005YM-A8 for bug-gnu-emacs@gnu.org; Wed, 13 Aug 2008 15:09:41 -0400 Received: from colin.muc.de ([193.149.48.1]:1975 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KTLj0-0003vs-Nb for bug-gnu-emacs@gnu.org; Wed, 13 Aug 2008 15:09:39 -0400 Received: (qmail 31431 invoked by uid 3782); 13 Aug 2008 19:09:33 -0000 Received: from acm.muc.de (pD9E51A56.dip.t-dialin.net [217.229.26.86]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Wed, 13 Aug 2008 21:09:32 +0200 Received: (qmail 2932 invoked by uid 1000); 13 Aug 2008 19:11:41 -0000 Date: Wed, 13 Aug 2008 19:11:41 +0000 To: bug-gnu-emacs@gnu.org Message-ID: <20080813191141.GA2825@muc.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 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). From unknown Mon Aug 18 09:00:40 2025 X-Loop: don@donarmstrong.com Subject: bug#714: directory-files: Doc string is irritatingly vague wrt sorting. Reply-To: Glenn Morris , 714@debbugs.gnu.org Resent-From: Glenn Morris Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 15 Aug 2008 19:25:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 714 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 714-submit@emacsbugs.donarmstrong.com id=B714.121882777011465 (code B ref 714); Fri, 15 Aug 2008 19:25:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-11.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 714) by emacsbugs.donarmstrong.com; 15 Aug 2008 19:16:10 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7FJG6ew011459 for <714@emacsbugs.donarmstrong.com>; Fri, 15 Aug 2008 12:16:08 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KU4l9-0002ih-CO; Fri, 15 Aug 2008 15:14:51 -0400 From: Glenn Morris To: Alan Mackenzie Cc: 714@debbugs.gnu.org References: <20080813191141.GA2825@muc.de> X-Spook: emc SCUD missile Bellcore Manfurov South Africa Elvis X-Ran: an[-Co/ZeQ"8byaIlaE3@uR,[![DM<,S|@$+UrR@\kYVM6VQ}vDG$"9ea.bAVi@a-BZK$6 X-Hue: cyan X-Attribution: GM Date: Fri, 15 Aug 2008 15:14:51 -0400 In-Reply-To: <20080813191141.GA2825@muc.de> (Alan Mackenzie's message of "Wed, 13 Aug 2008 19:11:41 +0000") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Alan Mackenzie wrote: > 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. Will saying it uses `string-lessp' be good enough for you? The details of said function are in the Elisp manual. From unknown Mon Aug 18 09:00:40 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Alan Mackenzie Subject: bug#714 closed by Chong Yidong (Re: directory-files: Doc string is irritatingly vague wrt sorting.) Message-ID: References: <877iai8211.fsf@cyd.mit.edu> <20080813191141.GA2825@muc.de> X-Emacs-PR-Message: they-closed 714 X-Emacs-PR-Package: emacs Reply-To: 714@debbugs.gnu.org Content-Type: multipart/mixed; boundary="----------=_1218831905-32233-1" This is a multi-part message in MIME format... ------------=_1218831905-32233-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 . 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 by replying to this email. --=20 714: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D714 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1218831905-32233-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From cyd@stupidchicken.com Fri Aug 15 13:18:23 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 714-done) by emacsbugs.donarmstrong.com; 15 Aug 2008 20:18:23 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7FKIKLe030547 for <714-done@emacsbugs.donarmstrong.com>; Fri, 15 Aug 2008 13:18:21 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id ACE3F57E337; Fri, 15 Aug 2008 16:19:06 -0400 (EDT) From: Chong Yidong To: Alan Mackenzie Cc: 714-done@debbugs.gnu.org Subject: Re: directory-files: Doc string is irritatingly vague wrt sorting. Date: Fri, 15 Aug 2008 16:19:06 -0400 Message-ID: <877iai8211.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I've clarified the docstring. Thanks. ------------=_1218831905-32233-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From acm@muc.de Wed Aug 13 12:09:49 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.8 required=4.0 tests=AWL,BAYES_00,FOURLA, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 13 Aug 2008 19:09:50 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7DJ9jMp018970 for ; Wed, 13 Aug 2008 12:09:47 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KTLj5-0005Zy-Ds for bug-gnu-emacs@gnu.org; Wed, 13 Aug 2008 15:09:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KTLj3-0005YX-KH for bug-gnu-emacs@gnu.org; Wed, 13 Aug 2008 15:09:42 -0400 Received: from [199.232.76.173] (port=57898 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTLj3-0005YM-A8 for bug-gnu-emacs@gnu.org; Wed, 13 Aug 2008 15:09:41 -0400 Received: from colin.muc.de ([193.149.48.1]:1975 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KTLj0-0003vs-Nb for bug-gnu-emacs@gnu.org; Wed, 13 Aug 2008 15:09:39 -0400 Received: (qmail 31431 invoked by uid 3782); 13 Aug 2008 19:09:33 -0000 Received: from acm.muc.de (pD9E51A56.dip.t-dialin.net [217.229.26.86]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Wed, 13 Aug 2008 21:09:32 +0200 Received: (qmail 2932 invoked by uid 1000); 13 Aug 2008 19:11:41 -0000 Date: Wed, 13 Aug 2008 19:11:41 +0000 To: bug-gnu-emacs@gnu.org Subject: directory-files: Doc string is irritatingly vague wrt sorting. Message-ID: <20080813191141.GA2825@muc.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 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). ------------=_1218831905-32233-1--