[Emacs] Simpler hook for org-unique-id
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is failing

This commit is contained in:
Lucien Cartier-Tilet 2022-08-24 20:08:46 +02:00
parent 2e20b9594c
commit 52c23fb47c
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -4608,14 +4608,7 @@ meaningful IDs for its headings. I actually wrote a package for this!
:repo "Phundrak/org-unique-id") :repo "Phundrak/org-unique-id")
:defer t :defer t
:after org :after org
:init :init (add-hook 'before-save-hook #'org-unique-id-maybe))
(add-hook 'org-mode-hook
(lambda ()
(add-hook 'before-save-hook
(lambda ()
(when (and (eq major-mode 'org-mode)
(eq buffer-read-only nil))
(org-unique-id)))))))
#+end_src #+end_src
*** Capture *** Capture