emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] commit 7719734dd7 org-compat.el: New compatibility function `org


From: Nick Dokos
Subject: Re: [O] commit 7719734dd7 org-compat.el: New compatibility function `org-random'
Date: Thu, 06 Sep 2012 14:24:09 -0400

Bastien <address@hidden> wrote:

> Achim Gratz <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]