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

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
1 changed files with 1 additions and 8 deletions

View File

@ -4608,14 +4608,7 @@ meaningful IDs for its headings. I actually wrote a package for this!
:repo "Phundrak/org-unique-id")
:defer t
:after org
:init
(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)))))))
:init (add-hook 'before-save-hook #'org-unique-id-maybe))
#+end_src
*** Capture