GNU bug report logs - #33237
26.1, 7.3 emacs-mac: <fnum> list order in C-h b

Previous Next

Package: emacs;

Reported by: Van L <van <at> scratch.space>

Date: Fri, 2 Nov 2018 04:49:02 UTC

Severity: wishlist

Tags: fixed

Found in version 26.1

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 33237 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: van <at> scratch.space, 33237 <at> debbugs.gnu.org
Subject: Re: bug#33237: 26.1, 7.3 emacs-mac: <fnum> list order in C-h b
Date: Thu, 11 Jul 2019 16:50:22 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> It sounds very strange to use string-version-lessp here, so I think
> this must have a comment explaining why.

Yup.  I mean, it's a function with a strange name, but what it does is
nice (i.e., sort stretches of digits as a number).  In other
environments the function is often called something like "natural sort".

> Btw, did you try string-collate-lessp instead?

Yes, I tried it first, and it didn't do what I thought it would do:

(sort '("1" "2" "11") 'string-collate-lessp)
=> ("1" "11" "2")

Which isn't what we want...

I'll go ahead and apply the patch (with a comment) and we can see how we
like the result.

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




This bug report was last modified 5 years and 310 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.