From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Human-readable file sorting Date: Sat, 20 Feb 2016 18:15:02 +1100 Message-ID: <87oabbdf9l.fsf@gnus.org> References: <87povs41xg.fsf@gnus.org> <87bn7c3yms.fsf@gnus.org> <87r3g7exb2.fsf@gnus.org> <87twl3vrk9.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1455952563 6846 80.91.229.3 (20 Feb 2016 07:16:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Feb 2016 07:16:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Marcin Borkowski Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 20 08:15:54 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aX1lg-0007KG-PA for ged-emacs-devel@m.gmane.org; Sat, 20 Feb 2016 08:15:52 +0100 Original-Received: from localhost ([::1]:58799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX1lg-00076k-4X for ged-emacs-devel@m.gmane.org; Sat, 20 Feb 2016 02:15:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX1lP-00076a-Qv for emacs-devel@gnu.org; Sat, 20 Feb 2016 02:15:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aX1lM-00036Z-Km for emacs-devel@gnu.org; Sat, 20 Feb 2016 02:15:35 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:40065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX1lM-00036U-Dw for emacs-devel@gnu.org; Sat, 20 Feb 2016 02:15:32 -0500 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aX1ky-00008m-QS; Sat, 20 Feb 2016 08:15:09 +0100 In-Reply-To: <87twl3vrk9.fsf@mbork.pl> (Marcin Borkowski's message of "Sat, 20 Feb 2016 07:12:06 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aX1ky-00008m-QS MailScanner-NULL-Check: 1456557310.13244@veLhwzqbsfnhq8/ro641dw X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200280 Archived-At: Marcin Borkowski writes: > Wouldn't it be cleaner (and more flexible) to introduce a variable > `file-string-lessp-function'? Then the user could also account for > 1,000.23 and similar cases by themselves when needed. One could then > even put a special value in .dir-locals.el for e.g. music files (which > sometimes follow strange naming conventions). We could allow `file-sorting-method' to be a function in addition to the special symbols. I kinda like having predefined symbols for user-oriented variables, though. Less chance of users getting confused. :-) > BTW, I like this idea. FWIW, exactly because of this issue I use > trailing zeros when naming files, and do not expect file sorting to be > too smart, but many people don't do this, and renaming files I get from > them is a pain. I had a collection of stuff that I had padded with four zeros, and then I needed another digit. *sigh* Computers are really good at doing stuff like sorting, so we should let them do that, so that humans don't have to do so much work. :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no