From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: commit 7719734dd7 org-compat.el: New compatibility function `org-random' Date: Thu, 06 Sep 2012 14:24:09 -0400 Message-ID: <3345.1346955849@alphaville.americas.hpqcorp.net> References: <87k3w7dtt2.fsf@Rainer.invalid> <87bohj3vx0.fsf@altern.org> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57806) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9gkR-0008UC-6p for emacs-orgmode@gnu.org; Thu, 06 Sep 2012 14:24:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9gkO-0001BR-Ge for emacs-orgmode@gnu.org; Thu, 06 Sep 2012 14:24:15 -0400 Received: from g4t0014.houston.hp.com ([15.201.24.17]:10514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9gkO-0001BF-BW for emacs-orgmode@gnu.org; Thu, 06 Sep 2012 14:24:12 -0400 In-Reply-To: Message from Bastien of "Thu\, 06 Sep 2012 19\:26\:03 +0200." <87bohj3vx0.fsf@altern.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Achim Gratz , emacs-orgmode@gnu.org Bastien wrote: > Achim Gratz writes: >=20 > > Sorry, but that macro doesn't call `random=C2=B4 appropriately at all.= =20=20 >=20 > The real problem is (random t) in previous versions of org-id.el. >=20 > 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). >=20 > > No package should ever use `(random t)=C2=B4 at all and especially not > > repeatedly. >=20 > I thought (random t) was okay especially because related functions > (e.g. org-id-new) are *never* repeated at regular intervals. >=20 > Besides, (random t) is documented in Emacs <24.3 and XEmacs. >=20 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