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: master 71783e9: Add the string-numeric-lessp function Date: Mon, 22 Feb 2016 15:22:59 +1100 Message-ID: <87vb5hwezg.fsf@gnus.org> References: <20160221043348.25201.81719@vcs.savannah.gnu.org> <87twl2fzaw.fsf@gnus.org> <56CA2C66.7040306@cs.ucla.edu> <87povpzc9c.fsf@gnus.org> <56CA8578.2030004@cs.ucla.edu> <87twl1xul1.fsf@gnus.org> <56CA8BB8.6040908@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456115029 13438 80.91.229.3 (22 Feb 2016 04:23:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Feb 2016 04:23:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 22 05:23:39 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 1aXi26-0003vG-NJ for ged-emacs-devel@m.gmane.org; Mon, 22 Feb 2016 05:23:38 +0100 Original-Received: from localhost ([::1]:46858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXi25-00020G-UW for ged-emacs-devel@m.gmane.org; Sun, 21 Feb 2016 23:23:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXi22-0001zV-Az for emacs-devel@gnu.org; Sun, 21 Feb 2016 23:23:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXi1y-0004xC-AR for emacs-devel@gnu.org; Sun, 21 Feb 2016 23:23:34 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:60451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXi1y-0004wv-3j for emacs-devel@gnu.org; Sun, 21 Feb 2016 23:23:30 -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 1aXi1Y-0001FZ-B3; Mon, 22 Feb 2016 05:23:05 +0100 In-Reply-To: <56CA8BB8.6040908@cs.ucla.edu> (Paul Eggert's message of "Sun, 21 Feb 2016 20:16:56 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aXi1Y-0001FZ-B3 MailScanner-NULL-Check: 1456719786.08526@YsDmx8OA3kHodHQsPGRx1w 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:200435 Archived-At: Paul Eggert 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