From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: version comparison functions Date: Fri, 26 Aug 2005 15:41:34 +0200 Message-ID: <85zmr47r3l.fsf@lola.goethe.zz> References: <430F182A.3000909@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1125071735 25856 80.91.229.2 (26 Aug 2005 15:55:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 26 Aug 2005 15:55:35 +0000 (UTC) Cc: Juanma Barranquero , emacs-devel@gnu.org, rms@gnu.org, "Kim F. Storm" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 26 17:55:32 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E8gW3-0003UL-SJ for ged-emacs-devel@m.gmane.org; Fri, 26 Aug 2005 17:53:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E8gZz-00032k-Ty for ged-emacs-devel@m.gmane.org; Fri, 26 Aug 2005 11:57:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E8gVE-0000ap-0I for emacs-devel@gnu.org; Fri, 26 Aug 2005 11:52:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E8gUw-0000WN-Bs for emacs-devel@gnu.org; Fri, 26 Aug 2005 11:52:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E8gUt-0000NY-2p for emacs-devel@gnu.org; Fri, 26 Aug 2005 11:52:03 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E8gLA-0005ax-7x for emacs-devel@gnu.org; Fri, 26 Aug 2005 11:42:00 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1E8gJ0-0000PP-HJ; Fri, 26 Aug 2005 11:39:46 -0400 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id BBFC81C4CE17; Fri, 26 Aug 2005 15:41:34 +0200 (CEST) Original-To: Jason Rumney In-Reply-To: <430F182A.3000909@gnu.org> (Jason Rumney's message of "Fri, 26 Aug 2005 14:24:58 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:42433 Archived-At: Jason Rumney writes: > Kim F. Storm wrote: > >>..but now that it has happened, I think it makes sense for these >>functions to accept an optional argument to limit the number of >>version string elements to compare. E.g. >> >> (version= "22.0.50" "22.0.50.37") => nil >> (version= "22.0.50.36" "22.0.50.37") => nil >> >> (version= "22.0.50" "22.0.50.37" 3) => t >> (version= "22.0.50.36" "22.0.50.37" 3) => t >> >> > This may be useful as an addition to a general version number > comparison, but for Emacs version numbers, I think we should DTRT > based on the shorter of the two arguments: > > (version= "22" "22.0.50.37") => t That would mean (version= "22" "22.0.50.37") => t (version= "22" "22.1.50.37") => t (version= "22.0.50.37" "22.0.50.37") => nil Not exactly endearing to the average mathematician or logician... -- David Kastrup, Kriemhildstr. 15, 44793 Bochum