emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Human-readable file sorting


From: Marcin Borkowski
Subject: Re: Human-readable file sorting
Date: Sat, 20 Feb 2016 09:14:48 +0100
User-agent: mu4e 0.9.13; emacs 25.1.50.2

On 2016-02-20, at 08:15, Lars Ingebrigtsen <address@hidden> wrote:

> Marcin Borkowski <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]