(fix): build org-roam cache on org-roam-mode (#210)

`org-roam-build-cache` takes very little time, when the cache is
already built running it on `org-roam-mode` ensures that the cache is
consistent with the files.
This commit is contained in:
Jethro Kuan 2020-03-01 02:35:01 +08:00 committed by GitHub
parent 9296470d17
commit a88076a704
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -851,6 +851,7 @@ If ARG is `toggle', toggle `org-roam-mode'. Otherwise, behave as if called inter
:global t
(cond
(org-roam-mode
(org-roam-build-cache)
(add-hook 'find-file-hook #'org-roam--find-file-hook-function)
(add-hook 'kill-emacs-hook #'org-roam--db-close-all)
(advice-add 'rename-file :after #'org-roam--rename-file-advice)