(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.
master
Jethro Kuan 4 years ago committed by GitHub
parent b6d59e2238
commit 7ad5572741
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      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."

Loading…
Cancel
Save