From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: version> and version>= Date: Wed, 02 Feb 2022 15:15:37 +0100 Message-ID: <87bkzp2vx8.fsf@gnu.org> References: <87k0ed2xq1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33846"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.6; emacs 29.0.50 Cc: help-gnu-emacs@gnu.org, Stefan Monnier To: goncholden Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 02 16:31:58 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nFHbx-0008W9-M6 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Feb 2022 16:31:57 +0100 Original-Received: from localhost ([::1]:34816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFHbw-0000nO-Ky for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Feb 2022 10:31:56 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFGTr-0001ou-De for help-gnu-emacs@gnu.org; Wed, 02 Feb 2022 09:19:31 -0500 Original-Received: from [2001:470:142:3::e] (port=34060 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFGTf-0007sB-Cw; Wed, 02 Feb 2022 09:19:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=1u8Tgx65vOHGSuODXDmh3bDwAlmjJLipbnmsTmIDRx8=; b=RYwI/DqFcsISYO vHL/DfaKQt5y0/eeihSOqe69TNy5l02C9oxVWrH9DYDo6sN3eoPTSAPFpz7RqtD9PodiaCx9TWlHQ lADAmkv+K2GtlbHntzSmrFO+ZD4jCaMvGFHJVE9waa+PZpa3e3mB6sMEyS9EWjnjeIyAze4qnaS8a FhX+XIjP7ckN5gorSYGTi8L327+A+zCob7q3ldib2hMWzYjpzSaWZLWxfangNkyEjKY+GQqbJBSfG bRvrjhmI5fWD7mfTR7BJcwUGUAAGOxhqUjIGLs3kZsouMnflCHLDUbzj82vuqx67ks3n4uZ/boRKh DI0WeACt80j5TWWf5HFQ==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:58475) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nFGTf-0007lh-6y; Wed, 02 Feb 2022 09:19:19 -0500 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id B975C27C005A; Wed, 2 Feb 2022 09:19:18 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 02 Feb 2022 09:19:18 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrgeehgdeigecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvffuffgjkfggtgesthdtredttdertdenucfhrhhomhepvfgrshhsihhl ohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpeevve eikeetkeeviefgfeffiedvteeguddvffeuueduveegtddthedvhfeuveffhfenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhnodhmvg hsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhedvleek qdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 2 Feb 2022 09:19:17 -0500 (EST) In-reply-to: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:135663 Archived-At: goncholden writes: >> `emacs-version' is a string, 28.0 is a float. You cannot compare >> them. Stefan suggested to use` emacs-major-version' with 28 (both >> integers) instead. > > It would be convenient if there was a function that could handle > floats, so that one can condition not just on a major version, but > upon the complete version number. As said in my other mail, floats are not good for this because in math, 1.2 is greater than 1.10 but with versions, 1.10 is greater than 1.2. See my other mail: if you really need to check major, minor, and maybe even micro version, then use `version<' with the version strings. Bye, Tassilo PS: Could you please teach your mail client not to remove the Re: from the subject of replies? Every reply of yours looks like a new thread on first sight.