diff --git a/init.org b/init.org index 741d8dc..9704017 100644 --- a/init.org +++ b/init.org @@ -3963,23 +3963,10 @@ preceded by another heading) and after headings." :hook (org-mode . org-superstar-mode)) #+END_SRC -*** Automatically add CUSTOM_ID property -Probably best run in =before-save-hook=. Considerations - -1. making human-readable CUSTOM_IDs by reusing heading titles -2. maintaining CUSTOM_ID uniqueness - +*** auto-id #+BEGIN_SRC emacs-lisp -(defun my-org-set-custom-id () - (let (headings) - (org-map-region - (lambda () - (let ((heading (org-element-at-point))) - (unless (org-element-property "CUSTOM_ID" heading) - (cl-pushnew (org-element-property :title heading) headings)))) - (point-min) - (point-max)) - (reverse headings))) -(add-hook 'org-insert-heading-hook #'my-org-set-custom-id) +(use-package auto-id + :load-path "/media/data/anon/Documents/Text Files/programming/elisp/auto-id/") #+END_SRC ** markdown-mode :editing: