diff --git a/CHANGELOG.md b/CHANGELOG.md index d98f0d9..3845355 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,8 @@ * [#545](https://github.com/jethrokuan/org-roam/pull/545) fix `org-roam--extract-links` to ensure that multiple citations (`cite:key1,key2`) are split correctly ### Features -* [#538](https://github.com/jethrokuan/org-roam/pull/538) Optionally use text in first headline as title +* [#538](https://github.com/jethrokuan/org-roam/pull/538) Optionally use text in first headline as title +* [#553](https://github.com/jethrokuan/org-roam/pull/553) Add prefix argument to `org-roam-db-build-cache` for forcing rebuilds ## 1.1.0 (21-04-2020) diff --git a/org-roam-db.el b/org-roam-db.el index f614bf7..8595cb1 100644 --- a/org-roam-db.el +++ b/org-roam-db.el @@ -342,9 +342,11 @@ including the file itself. If the file does not have any connections, nil is re (org-roam-db--update-cache-links) (org-roam-buffer--update-maybe :redisplay t)))))) -(defun org-roam-db-build-cache () - "Build the cache for `org-roam-directory'." - (interactive) +(defun org-roam-db-build-cache (&optional force) + "Build the cache for `org-roam-directory'. +If FORCE, force a rebuild of the cache from scratch." + (interactive "P") + (when force (delete-file (org-roam-db--get))) (org-roam-db--close) ;; Force a reconnect (org-roam-db) ;; To initialize the database, no-op if already initialized (let* ((org-roam-files (org-roam--list-all-files))