emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] [patch] org-id: New org-id-method 'uuid' w/ elisp function tha


From: David Maus
Subject: [Orgmode] [patch] org-id: New org-id-method 'uuid' w/ elisp function that creates random uuid
Date: Fri, 07 May 2010 17:57:05 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/23.1 (i486-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Attached patch for org-id adds a new function `org-id-uuid' that
returns a random (version 4) uuid following the format and suggestions
in RFC 4122:

  - it collects some random, system ans user specific data

  - creates a md5 hash for this data to obtain the require 32 octets

  - flips the correct bits to indicate a random uuid

Using the elisp method to create a random uuid can be customized by
setting `org-id-method' to 'uuid.

In addition `org-id-new' throws an error when the call to
`org-id-uuid-program' returns something that does not look like a
uuid.[1]

HTH
 -- David


[1] Sorry, this should have been a patch on its own.

--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... address@hidden
Email..... address@hidden

Attachment: org-id-uuid-elisp.diff
Description: Binary data

Attachment: pgpvPCtsEGiaA.pgp
Description: PGP signature


reply via email to

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