Generate UIDs
This commit is contained in:
parent
3e6bb18034
commit
b4abd0455a
1 changed files with 9 additions and 1 deletions
|
@ -157,4 +157,12 @@
|
||||||
;; (or shr-current-font 'variable-pitch)))))))))
|
;; (or shr-current-font 'variable-pitch)))))))))
|
||||||
|
|
||||||
(defun mk/get-current-time-formatted ()
|
(defun mk/get-current-time-formatted ()
|
||||||
(concat "#+DATE: " (format "[%s]" (format-time-string "%Y-%m-%d %R" (current-time)))))
|
(concat "#+DATE: "
|
||||||
|
(format "[%s]" (format-time-string "%Y-%m-%d %R" (current-time)))))
|
||||||
|
|
||||||
|
(defun generate-unique-id ()
|
||||||
|
(interactive)
|
||||||
|
(let ((random-number-1 (random 9999))
|
||||||
|
(random-number-2 (random 9999)))
|
||||||
|
(let ((unique-id (format "DE-%04d-%04d" random-number-1 random-number-2)))
|
||||||
|
(message "ID: %s" unique-id) unique-id)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue