diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a5b9d2..3ae9c2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Changed ### Fixed +- [#1281](https://github.com/org-roam/org-roam/pull/1281) fixed idle-timer not instantiated on `org-roam-mode` ## 1.2.3 (13-11-2020) diff --git a/org-roam.el b/org-roam.el index 4e77816..975465e 100644 --- a/org-roam.el +++ b/org-roam.el @@ -1492,8 +1492,8 @@ M-x info for more information at Org-roam > Installation > Post-Installation Tas (add-hook 'find-file-hook #'org-roam--find-file-hook-function) (add-hook 'kill-emacs-hook #'org-roam-db--close-all) (add-hook 'org-open-at-point-functions #'org-roam-open-id-at-point) - (if (and org-roam-db-file-update-timer - (eq org-roam-db-update-method 'idle-timer)) + (when (and (not org-roam-db-file-update-timer) + (eq org-roam-db-update-method 'idle-timer)) (setq org-roam-db-file-update-timer (run-with-idle-timer org-roam-db-update-idle-seconds t #'org-roam-db-update-cache-on-timer))) (advice-add 'rename-file :after #'org-roam--rename-file-advice) (advice-add 'delete-file :before #'org-roam--delete-file-advice)