From: goncholden <goncholden@protonmail.com>
To: Tassilo Horn <tsdh@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, help-gnu-emacs@gnu.org
Subject: version> and version>=
Date: Wed, 02 Feb 2022 14:14:54 +0000 [thread overview]
Message-ID: <FX9Yq2WHVzOBG4hojIcAvh8vHdFO7CdBPrpUauPIwyREZJkUCQ0XF2KqWvEQ9Wb2IA309PiO2tCZFYLfwmTYklOeJBZZunkNtau4vc7fplM=@protonmail.com> (raw)
In-Reply-To: <87fsp12wxb.fsf@gnu.org>
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, February 2nd, 2022 at 1:52 PM, Tassilo Horn <tsdh@gnu.org> wrote:
> 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<= "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
(>= 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.
next prev parent reply other threads:[~2022-02-02 14:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-01 18:01 version> and version>= goncholden
2022-02-01 23:20 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-02 3:47 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-02-02 10:21 ` goncholden
2022-02-02 13:38 ` Tassilo Horn
2022-02-02 13:48 ` goncholden
2022-02-02 13:52 ` Tassilo Horn
2022-02-02 14:14 ` goncholden [this message]
2022-02-02 14:23 ` Tassilo Horn
2022-02-02 14:15 ` Tassilo Horn
2022-02-02 14:27 ` goncholden
2022-02-02 14:30 ` Tassilo Horn
2022-02-02 14:51 ` Eli Zaretskii
2022-02-02 15:00 ` Yuri Khan
2022-02-02 15:07 ` goncholden
-- strict thread matches above, loose matches on Subject: below --
2022-02-01 14:50 goncholden via Users list for the GNU Emacs text editor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='FX9Yq2WHVzOBG4hojIcAvh8vHdFO7CdBPrpUauPIwyREZJkUCQ0XF2KqWvEQ9Wb2IA309PiO2tCZFYLfwmTYklOeJBZZunkNtau4vc7fplM=@protonmail.com' \
--to=goncholden@protonmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=tsdh@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.