emacs-devel
[Top][All Lists]
Advanced

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

Re: master 71783e9: Add the string-numeric-lessp function


From: Lars Ingebrigtsen
Subject: Re: master 71783e9: Add the string-numeric-lessp function
Date: Mon, 22 Feb 2016 15:22:59 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Paul Eggert <address@hidden> writes:

> Lars Ingebrigtsen wrote:
>
>> I don't think that's something our numerical string comparison function
>> should be doing.
>
> Again, I'm not sure I'm following. The two strings "2.21-0ubuntu4" and
> "2.21-0ubuntu4.1" are identical except the latter has ".1"
> appended. Shouldn't almost any sane kind of string comparison consider
> the shorter to be less than the longer?

Oh, I thought you meant that it considered "4.1" to be one unit in the
string, and compared as such.  Sorry for misunderstanding.

> The GNU ls -v approach works well in practice, because people who care
> about version numbers tend to name their files consistently. E.g.,
> they do not put files "foo001.png" "foo1.png" in the same directory,
> because that kind of usage would confuse humans no matter what 'ls -v'
> does.

Yeah, but this isn't about people who care about version numbers.  Its
about real world usage where people just dump a lot of files in a
directory, and expect to be able to find them afterwards.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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