summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2009-07-24 02:29:56 +0200
committerBastien Guerry <bzg@altern.org>2009-07-24 02:29:56 +0200
commitbd4a9fe51060eec25253c3c7e81083c99a19b1ca (patch)
treed5f6108e06409a02b5ea4ba5c238c530828404bf
parent5a7f43293d77553e6c8aa1a0b34b828f846aeb41 (diff)
downloadorg-mode-bd4a9fe51060eec25253c3c7e81083c99a19b1ca.tar.gz
org-id.el: New option org-id-uuid-program to set uuidgen program.
On some systems, uuidgen is named uuid. Let the user define the uuidgen program name.
-rwxr-xr-xlisp/ChangeLog7
-rw-r--r--lisp/org-id.el9
2 files changed, 14 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 342daf1..a1be956 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-24 Bastien Guerry <bzg@altern.org>
+
+ * org-id.el (org-id-uuid-program): New option to set the name of
+ the uuidgen program.
+ (org-id-method): Use `org-id-uuid-program'.
+ (org-id-new): Use `org-id-uuid-program'.
+
2009-07-23 Bastien Guerry <bzg@altern.org>
* org-exp.el (org-export-number-lines): Allow whitespace in code
diff --git a/lisp/org-id.el b/lisp/org-id.el
index 786c465..2f08fe3 100644
--- a/lisp/org-id.el
+++ b/lisp/org-id.el
@@ -79,11 +79,16 @@
:tag "Org ID"
:group 'org)
+(defcustom org-id-uuid-program "uuidgen"
+ "The uuidgen program."
+ :group 'org-id
+ :type 'string)
(defcustom org-id-method
(condition-case nil
(if (string-match "\\`[-0-9a-fA-F]\\{36\\}\\'"
- (org-trim (shell-command-to-string "uuidgen")))
+ (org-trim (shell-command-to-string
+ org-id-uuid-program)))
'uuidgen
'org)
(error 'org))
@@ -301,7 +306,7 @@ So a typical ID could look like \"Org:4nd91V40HI\"."
(if (equal prefix ":") (setq prefix ""))
(cond
((eq org-id-method 'uuidgen)
- (setq unique (org-trim (shell-command-to-string "uuidgen"))))
+ (setq unique (org-trim (shell-command-to-string org-id-uuid-program))))
((eq org-id-method 'org)
(let* ((etime (org-id-reverse-string (org-id-time-to-b36)))
(postfix (if org-id-include-domain