From d70198bba9f78c00a87f67ff9eb8846f9b0ebba3 Mon Sep 17 00:00:00 2001 From: Natnael Kahssay <39103342+natask@users.noreply.github.com> Date: Sun, 15 Nov 2020 18:38:58 -0800 Subject: [PATCH] (fix): fix cache updates on org-id creation in non-existing files (#1288) closes #1287 --- org-roam.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org-roam.el b/org-roam.el index d43d0cc..fb4ec6c 100644 --- a/org-roam.el +++ b/org-roam.el @@ -1451,7 +1451,9 @@ When NEW-FILE-OR-DIR is a directory, we use it to compute the new file path." (defun org-roam--id-new-advice (&rest _args) "Update the database if a new Org ID is created." (when (and org-roam-enable-headline-linking - (org-roam--org-roam-file-p)) + (org-roam--org-roam-file-p) + (not (eq org-roam-db-update-method 'immediate)) + (not (org-roam-capture-p))) (org-roam-db-update))) ;;;###autoload