Fix wrong regex
This commit is contained in:
parent
8618a7580a
commit
ea91cc015f
@ -71,7 +71,7 @@ the variable `org-unique-id-prefix'."
|
|||||||
(progn
|
(progn
|
||||||
(require 'message)
|
(require 'message)
|
||||||
(concat "@" (message-make-fqdn))))))
|
(concat "@" (message-make-fqdn))))))
|
||||||
(concat prefix (car (split-string (concat etime postfix) "-")))))
|
(concat prefix "-" (car (split-string (concat etime postfix) "-")))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun org-unique-id-get (&optional pom create prefix)
|
(defun org-unique-id-get (&optional pom create prefix)
|
||||||
@ -90,11 +90,11 @@ CUSTOM_ID of the entry is returned."
|
|||||||
(replace-regexp-in-string
|
(replace-regexp-in-string
|
||||||
"[_-][_-]+" "-"
|
"[_-][_-]+" "-"
|
||||||
(replace-regexp-in-string
|
(replace-regexp-in-string
|
||||||
(rx (or alpha num "-" "_"))
|
"[^[:alpha:][:digit:]-_]"
|
||||||
"-"
|
"-"
|
||||||
(if (string= orgpath "")
|
(if (string= orgpath "")
|
||||||
(org-get-heading t t t t)
|
(org-get-heading t t t t)
|
||||||
(concat orgpath "_" (org-get-heading t t t t)))))))
|
(concat orgpath "-" (org-get-heading t t t t)))))))
|
||||||
(id (org-entry-get nil "CUSTOM_ID")))
|
(id (org-entry-get nil "CUSTOM_ID")))
|
||||||
(cond
|
(cond
|
||||||
((and id
|
((and id
|
||||||
@ -106,7 +106,6 @@ CUSTOM_ID of the entry is returned."
|
|||||||
(buffer-file-name (buffer-base-buffer)))
|
(buffer-file-name (buffer-base-buffer)))
|
||||||
id)))))
|
id)))))
|
||||||
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun org-unique-id ()
|
(defun org-unique-id ()
|
||||||
"Add a CUSTOM_ID to all headers missing one.
|
"Add a CUSTOM_ID to all headers missing one.
|
||||||
|
Loading…
Reference in New Issue
Block a user