mirror of
https://github.com/org-roam/org-roam
synced 2025-09-28 16:50:58 -05:00
(feat): add prefix argument to force database rebuild (#553)
* (feat): add prefix argument to force database rebuild * Update changelog
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
### Features
|
### 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)
|
## 1.1.0 (21-04-2020)
|
||||||
|
|
||||||
|
@@ -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-db--update-cache-links)
|
||||||
(org-roam-buffer--update-maybe :redisplay t))))))
|
(org-roam-buffer--update-maybe :redisplay t))))))
|
||||||
|
|
||||||
(defun org-roam-db-build-cache ()
|
(defun org-roam-db-build-cache (&optional force)
|
||||||
"Build the cache for `org-roam-directory'."
|
"Build the cache for `org-roam-directory'.
|
||||||
(interactive)
|
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--close) ;; Force a reconnect
|
||||||
(org-roam-db) ;; To initialize the database, no-op if already initialized
|
(org-roam-db) ;; To initialize the database, no-op if already initialized
|
||||||
(let* ((org-roam-files (org-roam--list-all-files))
|
(let* ((org-roam-files (org-roam--list-all-files))
|
||||||
|
Reference in New Issue
Block a user