From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Brad Collins Newsgroups: gmane.emacs.help Subject: How to create random characters? Date: Sun, 14 Dec 2003 16:59:52 +0700 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1071396014 22111 80.91.224.253 (14 Dec 2003 10:00:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 14 Dec 2003 10:00:14 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 14 11:00:11 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AVT2p-0006eV-00 for ; Sun, 14 Dec 2003 11:00:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AVTwS-0002im-J9 for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Dec 2003 05:57:40 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AVTw9-0002iO-Um for help-gnu-emacs@gnu.org; Sun, 14 Dec 2003 05:57:21 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AVTvd-0002at-3S for help-gnu-emacs@gnu.org; Sun, 14 Dec 2003 05:57:20 -0500 Original-Received: from [202.183.255.5] (helo=mailgw.cscoms.com) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AVTuE-0002KL-DQ for help-gnu-emacs@gnu.org; Sun, 14 Dec 2003 05:55:22 -0500 Original-Received: from cscoms.com (mail.cscoms.com. [202.183.255.23]) by mailgw.cscoms.com (8.12.8p2/8.12.3) with ESMTP id hBE9rndB094092 for ; Sun, 14 Dec 2003 16:53:50 +0700 (ICT) Original-Received: from KAME.cscoms.com (dial-433.ras-1.bkk.c.cscoms.com [203.170.159.245]) by cscoms.com (8.12.8p2/8.12.3) with ESMTP id hBE9rWDh006357 for ; Sun, 14 Dec 2003 16:53:49 +0700 (GMT) Original-To: help-gnu-emacs User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (windows-nt) X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15239 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15239 I'm hoping there is a simple function in elisp to do this.... I want to generate a random id which is in the format of XXX-0000 where 'XXX' is made up of ascii characters a-z and 0000 is a random number 0000-9999. I found random -- so that (random 10000) produces the number very nicely but I can't find anything that will produce three random characters in the same way. Is there a simple way of doing this that I haven't found? Cheers, b/ -- Brad Collins Chenla Labs Bangkok, Thailand