unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Are floating point numbers ok in version-regexp-alist?
Date: Wed, 15 Mar 2017 18:43:21 -0400	[thread overview]
Message-ID: <51d6ba6a-f16b-30a3-c735-3c2165155ba4@gmail.com> (raw)

Hi emacs-devel,

I need to compare debian-like version numbers, in which 1.0 < 1.0dev < 1.1:

$ dpkg --compare-versions 1.0 lt 1.0dev; echo $?
0
$ dpkg --compare-versions 1.0dev lt 1.1; echo $?
0

My instinct would be to write this:

(let ((version-regexp-alist `(("dev" . 0.5) ,@version-regexp-alist)))
  (and (version< "1.0" "1.0dev")
       (version< "1.0dev" "1.0.1")))

Is it ok to use floating point numbers in version-regexp-alist?  Otherwise, do we have a facility to parse Debian version numbers in Emacs?

Thanks!
Clément.



                 reply	other threads:[~2017-03-15 22:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51d6ba6a-f16b-30a3-c735-3c2165155ba4@gmail.com \
    --to=cpitclaudel@gmail.com \
    --cc=emacs-devel@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).