chore: add patches, new project skills, and utility scripts
This commit is contained in:
18
add-org-ids.el
Normal file
18
add-org-ids.el
Normal file
@@ -0,0 +1,18 @@
|
||||
(require 'org)
|
||||
(require 'org-id)
|
||||
|
||||
;; Ensure IDs are created and formatted as UUIDs
|
||||
(setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)
|
||||
;; Actually, org-id-get-create automatically creates an ID if it does not exist.
|
||||
;; We'll use UUIDs for IDs
|
||||
(setq org-id-method 'uuid)
|
||||
|
||||
;; Iterate over all .org files in the notes/ directory
|
||||
(let ((files (directory-files "notes/" t "\\.org$")))
|
||||
(dolist (file files)
|
||||
(with-current-buffer (find-file-noselect file)
|
||||
(goto-char (point-min))
|
||||
;; Generate ID for the file itself
|
||||
(org-id-get-create t)
|
||||
(save-buffer)
|
||||
(kill-buffer))))
|
||||
Reference in New Issue
Block a user