From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.devel Subject: Re: Human-readable file sorting Date: Sat, 20 Feb 2016 09:14:48 +0100 Message-ID: <87r3g7vlvr.fsf@mbork.pl> References: <87povs41xg.fsf@gnus.org> <87bn7c3yms.fsf@gnus.org> <87r3g7exb2.fsf@gnus.org> <87twl3vrk9.fsf@mbork.pl> <87oabbdf9l.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1455956117 22781 80.91.229.3 (20 Feb 2016 08:15:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Feb 2016 08:15:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 20 09:15:10 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 1aX2h3-0000Vq-KA for ged-emacs-devel@m.gmane.org; Sat, 20 Feb 2016 09:15:09 +0100 Original-Received: from localhost ([::1]:59110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX2h2-0005Cc-Ha for ged-emacs-devel@m.gmane.org; Sat, 20 Feb 2016 03:15:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX2gv-0005Ab-6p for emacs-devel@gnu.org; Sat, 20 Feb 2016 03:15:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aX2gr-00015O-Cb for emacs-devel@gnu.org; Sat, 20 Feb 2016 03:15:01 -0500 Original-Received: from mail.mojserwer.eu ([2a01:5e00:2:52::8]:55205) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aX2gr-00015H-4t for emacs-devel@gnu.org; Sat, 20 Feb 2016 03:14:57 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 041169D2005; Sat, 20 Feb 2016 09:14:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NeokqOyKW7KM; Sat, 20 Feb 2016 09:14:48 +0100 (CET) Original-Received: from localhost (unknown [109.232.24.28]) by mail.mojserwer.eu (Postfix) with ESMTPSA id C13929D2004; Sat, 20 Feb 2016 09:14:48 +0100 (CET) User-agent: mu4e 0.9.13; emacs 25.1.50.2 In-reply-to: <87oabbdf9l.fsf@gnus.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2a01:5e00:2:52::8 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:200286 Archived-At: On 2016-02-20, at 08:15, Lars Ingebrigtsen wrote: > 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. :-) Good point. >> 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* Ha, once I had to decide on a policy for naming files. I carefully estimated how much digits I'd need (three), and then settled for four just to be safe. (I've been using that system for some 8 years now, and still have to reach the 0500 mark, so I don't expect an overflow within my life-span.) > 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. :-) And this is a very good point! I'd be the first to test this feature. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University