unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Arthur Miller <arthur.miller@live.com>
Cc: help-gnu-emacs@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: What is 0.01 here not 0.01 here 0.009999999999999?
Date: Sat, 3 Apr 2021 08:19:41 +0300	[thread overview]
Message-ID: <YGf67e1H10KTvvWl@protected.localdomain> (raw)
In-Reply-To: <AM9PR09MB4977B13A52342F25463A4A9C96799@AM9PR09MB4977.eurprd09.prod.outlook.com>

* Arthur Miller <arthur.miller@live.com> [2021-04-03 07:12]:
> Jean Louis <bugs@gnu.support> writes:
> 
> 
> > results with 10.12 and not something else. Results are used for
> > automated version numbers (in some cases).
> 
> Don't use floating points for version number. Use integers, One for each
> number: major, minor and revision. You can either defvar them each or
> use a vector or a list. You can them just simply increment the part you
> need in your revision control and use (format "%s.%s.%s" major minor
> revions) to print them to a string.

You mentioned one good way of defining revision versions. There is a
column in the table named `vc_revision' which is meant for author to
designate revision number. Some author may follow your advise
and enter revision version manually. Decision will not be
automatic. Somebody has to decide for major about major, minor and
revision, and is then free to enter it. Prompt may show how previous
version number looks like, and user may modify it.

Incrementing floating point is a feature for future user (who knows if
anybody), it will not increment in case of %s.%s.%s formatting.

Personally I do not need version numbers, but Emacs package needs
it. Presentation as floating point is I think, but not so sure, one of
possibilities.

My function is not quite compatible with `version-to-list'. 

(version-to-list "10.02") → (10 2)
(version-to-list "10.11") → (10 11)
(version-to-list "10.2.8") → (10 2 8)
(version-to-list "10.02.08") → (10 2 8)

I don't think automatic incrementing is necessary, it will remain just
for the one floating presentation.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://rms-support-letter.github.io/




  reply	other threads:[~2021-04-03  5:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02 13:42 What is 0.01 here not 0.01 here 0.009999999999999? Jean Louis
2021-04-02 13:56 ` Stefan Monnier
2021-04-02 17:03   ` Jean Louis
2021-04-02 17:41     ` Teemu Likonen
2021-04-02 18:44       ` Jean Louis
2021-04-02 20:46     ` John Yates
2021-04-02 21:19       ` Jean Louis
2021-04-02 22:04         ` John Yates
2021-04-02 23:29           ` Jean Louis
2021-04-03  4:39             ` Arthur Miller
2021-04-03  5:36               ` Jean Louis
2021-04-03  3:56     ` Arthur Miller
2021-04-03  5:19       ` Jean Louis [this message]
2021-04-03 13:54         ` Stefan Monnier
2021-04-02 14:02 ` Eli Zaretskii
2021-04-02 17:07   ` Jean Louis
2021-04-03  4:49     ` Arthur Miller
2021-04-16 20:41 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-17 10:53   ` Jean Louis
2021-04-19 10:51   ` Eric S Fraga

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=YGf67e1H10KTvvWl@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=arthur.miller@live.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
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).