[Top][All Lists]

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

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

From: Achim Gratz
Subject: Re: [O] commit 7719734dd7 org-compat.el: New compatibility function `org-random'
Date: Thu, 06 Sep 2012 20:02:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Bastien writes:
> 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).

That would be the correct thing to do.

>> 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.

That unfortunate misconception is built into many Emacs packages, hence
the effort to finally make this operation a no-op and move the seeding
of the PRNG to the Emacs init code.

> Besides, (random t) is documented in Emacs <24.3 and XEmacs.

Sure, but you still aren't supposed to re-seed a PRNG each time you want
a random number from it.  Especially not with the seeding method that
Emacs used to use.  Each Emacs session should call `(random t)´ exactly
once, in the user init file.

+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:

reply via email to

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