From: Nick Dokos <nicholas.dokos@hp.com>
To: Bastien <bzg@altern.org>
Cc: Achim Gratz <Stromeko@nexgo.de>, emacs-orgmode@gnu.org
Subject: Re: commit 7719734dd7 org-compat.el: New compatibility function `org-random'
Date: Thu, 06 Sep 2012 14:24:09 -0400 [thread overview]
Message-ID: <3345.1346955849@alphaville.americas.hpqcorp.net> (raw)
In-Reply-To: Message from Bastien <bzg@altern.org> of "Thu\, 06 Sep 2012 19\:26\:03 +0200." <87bohj3vx0.fsf@altern.org>
Bastien <bzg@altern.org> wrote:
> Achim Gratz <Stromeko@nexgo.de> writes:
>
> > Sorry, but that macro doesn't call `random´ appropriately at all.
>
> The real problem is (random t) in previous versions of org-id.el.
>
> Do you mean this should be (random) instead of (random t) in those
> versions? Why? If so, we can simply get rid of the compatibility
> macro and use (random).
>
> > No package should ever use `(random t)´ at all and especially not
> > repeatedly.
>
> I thought (random t) was okay especially because related functions
> (e.g. org-id-new) are *never* repeated at regular intervals.
>
> Besides, (random t) is documented in Emacs <24.3 and XEmacs.
>
My understanding is that (random t) is called *once* to seed the RNG -
after that you use (random) or (random N) - where N is a positive integer -
to get the next (pseudo) random number in the sequence (scaled to fit in
[0, N) in the second case).
Nick
next prev parent reply other threads:[~2012-09-06 18:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-06 16:01 commit 7719734dd7 org-compat.el: New compatibility function `org-random' Achim Gratz
2012-09-06 17:26 ` Bastien
2012-09-06 18:02 ` Achim Gratz
2012-09-06 18:24 ` Nick Dokos [this message]
2012-09-11 18:01 ` Achim Gratz
2012-09-11 18:30 ` Bastien
2012-09-11 19:49 ` Achim Gratz
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.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3345.1346955849@alphaville.americas.hpqcorp.net \
--to=nicholas.dokos@hp.com \
--cc=Stromeko@nexgo.de \
--cc=bzg@altern.org \
--cc=emacs-orgmode@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/org-mode.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).