From 8ec9d188d801c5bca11de69bb1a6f216a506f732 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Tue, 23 Nov 2021 12:54:33 +0100 Subject: [PATCH] config/doom: autosync org-roam properly --- .config/doom/config.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.config/doom/config.el b/.config/doom/config.el index 27cb152..d73be6a 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -385,7 +385,13 @@ Version 2019-11-04 2021-02-16" (when my/auto-org-roam-db-sync-mode (run-with-idle-timer my/auto-org-roam-db-sync--timer-interval :repeat - (and 'org-roam-db-sync 'org-roam-update-org-id-locations 'org-mode-restart))))) + #'my/org-roam-update)))) + + (defun my/org-roam-update () + "Update org-roam database and sync ids to org if in org-mode" + (interactive) + (when (equal major-mode 'org-mode) (org-roam-db-sync) (let ((org-display-remote-inline-images 'skip)) (org-roam-update-org-id-locations)) (org-mode-restart))) + (my/auto-org-roam-db-sync-mode) ;; Prompt after idleness - Focused? ETC? (Pragmatic Programmer) - org-journal )