From 7ad55727411acd5f6fbc9df7363e6dc62979cfa7 Mon Sep 17 00:00:00 2001 From: Jethro Kuan Date: Wed, 15 Dec 2021 16:48:44 +0800 Subject: [PATCH] (fix)db: fix node caching (#2006) Previously node caching used org-map-entries: this only mapped over agenda entries, hence skipping various nodes. Instead, we should be using org-map-region, which maps over the entire file. --- org-roam-db.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/org-roam-db.el b/org-roam-db.el index 7aae293..f55d955 100644 --- a/org-roam-db.el +++ b/org-roam-db.el @@ -338,12 +338,12 @@ If UPDATE-P is non-nil, first remove the file in the database." (defun org-roam-db-map-nodes (fns) "Run FNS over all nodes in the current buffer." - (org-with-point-at 1 - (org-map-entries - (lambda () - (when (org-roam-db-node-p) - (dolist (fn fns) - (funcall fn))))))) + (org-map-region + (lambda () + (when (org-roam-db-node-p) + (dolist (fn fns) + (funcall fn)))) + (point-min) (point-max))) (defun org-roam-db-map-links (fns) "Run FNS over all links in the current buffer."