diff options
| author | JSDurand <mmemmew@gmail.com> | 2026-06-01 16:37:24 +0800 |
|---|---|---|
| committer | JSDurand <mmemmew@gmail.com> | 2026-06-01 16:37:24 +0800 |
| commit | baaf778aa2a1d2f8b38d4671f59b88a7340d281d (patch) | |
| tree | bb29328ab7c083c94e613caca55796e746fc613a /basic.el | |
| parent | d7f69b960ccdae690b0df2530d2503003fef872a (diff) | |
basic: uuid generation function
* basic.el (durand-uuid): I just wrote this function so that I can
easily generate message id's: I want to store my notes as mails, so
I need to manually generate ids for links between notes to work.
Diffstat (limited to 'basic.el')
| -rw-r--r-- | basic.el | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -678,6 +678,15 @@ The remaining CONFIGS are evaluated after the package is loaded." (require ,package-name) ,@configs)) +;;; UUID generation + +(defun durand-uuid () + "Generate a kind of unique string." + (format + "<%s.%s@durand-emacs.local>" + (substring (secure-hash 'md5 (format-time-string "%x%X-%z")) 0 8) + (substring (secure-hash 'sha256 (format-time-string "%s%N")) 0 8))) + ;;; Test internet connection (defun durand-internet-on (&optional host) |
