2011-11-04

Emacs Lisp Exercise: insert-random-uuid

This week's exercise is to write a function “insert-random-uuid”. When called, it should insert a UUID. Here's some examples of UUID:

0a1cd3bc-96fa-71d1-4338-27092ca4cfa5
1e27a053-60a4-af61-f38d-9f1f123740d6
115024d2-7c74-326e-c9ec-064f42d08b31
070f1f0b-2454-3ffa-4aa2-d6e0652d03fe

basically, it's a random string of symbols 0 to 9 and a to f, arranged in 8-4-4-4-12 blocks. There are many ways to implement this. I'll post a solution in a couple of days.

If you really don't know elisp, this weekend is a good time to learn as any. This article might get you started: Emacs Lisp Basics.

2011-11-08 solution at http://xahlee.org/emacs/elisp_generate_uuid.html