From mboxrd@z Thu Jan  1 00:00:00 1970
Path: main.gmane.org!not-for-mail
From: Jesper Harder <harder@myrealbox.com>
Newsgroups: gmane.emacs.help
Subject: Re: UUIDGEN in lisp
Date: Sat, 14 Feb 2004 05:05:14 +0100
Organization: http://purl.org/harder/
Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org
Message-ID: <m3n07m4879.fsf@defun.localdomain>
References: <mailman.2374.1076727586.928.help-gnu-emacs@gnu.org>
NNTP-Posting-Host: deer.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: sea.gmane.org 1076732259 3264 80.91.224.253 (14 Feb 2004 04:17:39 GMT)
X-Complaints-To: usenet@sea.gmane.org
NNTP-Posting-Date: Sat, 14 Feb 2004 04:17:39 +0000 (UTC)
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 14 05:17:31 2004
Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>
Original-Received: from monty-python.gnu.org ([199.232.76.173])
	by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian))
	id 1ArrFD-0003iJ-00
	for <geh-help-gnu-emacs@m.gmane.org>; Sat, 14 Feb 2004 05:17:31 +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 1ArrEF-00050X-0b
	for geh-help-gnu-emacs@m.gmane.org; Fri, 13 Feb 2004 23:16:31 -0500
Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!not-for-mail
Original-Newsgroups: gnu.emacs.help
X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r;
	<N5ksn~%wJ@2pjF}="tV; FBsdpFarSWA<oYkZsViGf:F^SD-KXhvFxh;
	~]?)SWm~+u}; 0=x}<vOm&5J+?]yB2d]q4x8\0g7SX
Mail-Copies-To: never
User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)
Cancel-Lock: sha1:fNFi5qeXmS4fHq3bXmDzu8e9lTo=
Original-Lines: 22
Original-NNTP-Posting-Host: 195.249.82.235
Original-X-Trace: 1076731617 dtext02.news.tele.dk 147 195.249.82.235:5768
Original-X-Complaints-To: abuse@post.tele.dk
Original-Xref: shelby.stanford.edu gnu.emacs.help:120892
Original-To: help-gnu-emacs@gnu.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  <help-gnu-emacs.gnu.org>
List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
	<mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>,
	<mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org
Xref: main.gmane.org gmane.emacs.help:16841
X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16841

Brad Collins <brad@studiojungle.net> writes:

> I think it would be generally helpful to have a generic unique id
> generator for a number available for any application but I'm not
> sure if this has already been done or not.
>
> Any ideas?

Concat some strings that should identify the user -- uid, pid,
system-name etc. -- plus some random stuff, and take a hash?

Something like:

(md5 (format "%s%s%s%s%s%s%s%s" 
	     (user-uid)
	     (emacs-pid)
	     (system-name)
	     (user-full-name)
	     user-mail-address
	     (current-time)
	     (random)
	     (recent-keys)))