From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: goncholden Newsgroups: gmane.emacs.help Subject: version> and version>= Date: Wed, 02 Feb 2022 14:14:54 +0000 Message-ID: References: <87k0ed2xq1.fsf@gnu.org> <87fsp12wxb.fsf@gnu.org> Reply-To: goncholden Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16847"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , help-gnu-emacs@gnu.org To: Tassilo Horn Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 02 16:05:35 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 1nFHCR-00049e-1l for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Feb 2022 16:05:35 +0100 Original-Received: from localhost ([::1]:59188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nFHCP-0001iB-6I for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 02 Feb 2022 10:05:33 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFGPY-0007I3-DK for help-gnu-emacs@gnu.org; Wed, 02 Feb 2022 09:15:04 -0500 Original-Received: from mail-4324.protonmail.ch ([185.70.43.24]:46115) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nFGPR-0004rR-Cu for help-gnu-emacs@gnu.org; Wed, 02 Feb 2022 09:15:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1643811294; bh=H1Vnnp+5zUkSFKCsSJxQmFB88DlDHC/FItmZP4LGEgo=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:From:To:Cc; b=EDEEAMRdbIRwUyPJmjQk8/uz7P5O3vdSnwnx38H56Bba+6Dc3oq8rOC5B+fupBiHI YomRMtD6pRvFl4CpMo19AUdxpXGqnKw4s74dV+H+Pc73+j8/V20BJU3qssNUWZ5qZR gATAk2Leb6gpM4LReBxKMIqcG+EttXOKtFSPDrRMwUZyuYAxc/QVqkE1reTgt/0sgJ vinzORr6b7QM7UTt9BFduIJELJZE2yCI5YpFLsN0PBZnJH9BNYXhZqxNQKdY1O1Y2s uNPKHMXh8lsPG7LSmPmAGKg5m/lyKZAEVFGi1ZWnQmkEmX1J8LDQtPRyqAUzkBg13J K+jjlKnD8dNbg== In-Reply-To: <87fsp12wxb.fsf@gnu.org> Received-SPF: pass client-ip=185.70.43.24; envelope-from=goncholden@protonmail.com; helo=mail-4324.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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:135661 Archived-At: =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Wednesday, February 2nd, 2022 at 1:52 PM, Tassilo Horn wr= ote: > goncholden goncholden@protonmail.com 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. > > Well, usually there should be no API-breaking changes between Emacs X.Y > und X.Z, so version-checks more detailed than major version shouldn't be > needed. > > And there is already > > (version<=3D "28.0" emacs-version) > > if you want to test with version strings and have more control over > minor and even micro version. (Using floats for versions is just plain > wrong.) > > Bye, > Tassilo You make a good point about the "No API-Breaking Changes". Then perhaps (>=3D emacs-version "28.0") if one does not like floats. Although there is nothing wrong about floats because version numbers can easily be sorted numerically. In the old days, strings took over. I wish scripts could handle numeric computations better.