refactor(org): update org-roam emacsql deferral advice
org-roam-setup was made obsolete in Org Roam 2.0. Ref: org-roam/org-roam@5dce6261a2
This commit is contained in:
parent
8cbfbce394
commit
7e6baca99d
1 changed files with 20 additions and 19 deletions
|
@ -45,7 +45,8 @@ the database. See `+org-init-roam-h' for the launch process."
|
|||
"Setup `org-roam' but don't immediately initialize its database.
|
||||
Instead, initialize it when it will be actually needed."
|
||||
(letf! ((#'org-roam-db-sync #'ignore))
|
||||
(org-roam-setup))
|
||||
(org-roam-db-autosync-enable)))
|
||||
|
||||
(defadvice! +org-roam-try-init-db-a (&rest _)
|
||||
"Try to initialize org-roam database at the last possible safe moment.
|
||||
In case of failure, fail gracefully."
|
||||
|
@ -64,7 +65,7 @@ In case of failure, fail gracefully."
|
|||
"see *Compile-Log* buffer for details.\n"
|
||||
"To try reinitialize org-roam, run \"M-x org-roam-setup\"")))))
|
||||
(advice-remove 'org-roam-db-query #'+org-roam-try-init-db-a)
|
||||
(org-roam-db-sync)))
|
||||
(org-roam-db-sync))
|
||||
|
||||
(setq org-roam-directory
|
||||
(thread-first (or org-roam-directory "roam")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue