:PROPERTIES:
:ID: b40f11e3-8569-4fcd-b083-f1b682f23dc1
:END:
-Generate an ID when I capture someting, and when I try to link to it. Stolen from [[https://stackoverflow.com/questions/13340616/assign-ids-to-every-entry-in-org-mode][Stack Overflow]]
+Generate an ID when I capture someting, and when I try to link to it.
#+BEGIN_SRC emacs-lisp
(setq org-id-link-to-org-use-id t)
#+END_SRC
#+END_SRC
Run this on save of any org-mode file
-#+BEGIN_SRC emacs-lisp
+#+BEGIN_SRC emacs-lisp :tangle no
(add-hook 'org-mode-hook
(lambda ()
(add-hook 'before-save-hook 're/org-auto-generate-ids-in-file nil 'local)))