org-roam-db-sync: support emacs 26.1

don't use dolist with progress report if it does not exist. results in
slightly degraded experience, but at least it works.
This commit is contained in:
Jethro Kuan
2021-04-22 00:37:19 +08:00
parent 45aa3e6973
commit d53f0e60bf

View File

@ -425,12 +425,18 @@ If FORCE, force a rebuild of the cache from scratch."
contents-hash) contents-hash)
(push file modified-files))) (push file modified-files)))
(remhash file current-files)) (remhash file current-files))
(dolist-with-progress-reporter (file (hash-table-keys current-files)) (if (fboundp 'dolist-with-progress-reporter)
"Clearing removed files..." (dolist-with-progress-reporter (file (hash-table-keys current-files))
(org-roam-db-clear-file file)) "Clearing removed files..."
(dolist-with-progress-reporter (file modified-files) (org-roam-db-clear-file file))
"Processing modified files..." (dolist (file (hash-table-keys current-files))
(org-roam-db-update-file file)))) (org-roam-db-clear-file file)))
(if (fboundp 'dolist-with-progress-reporter)
(dolist-with-progress-reporter (file modified-files)
"Processing modified files..."
(org-roam-db-update-file file))
(dolist (file modified-files)
(org-roam-db-update-file file)))))
(defun org-roam-db-update-file (&optional file-path) (defun org-roam-db-update-file (&optional file-path)
"Update Org-roam cache for FILE-PATH. "Update Org-roam cache for FILE-PATH.