diff --git a/lisp/org-roam-dblocks.el b/lisp/org-roam-dblocks.el index 5824bed..568960d 100644 --- a/lisp/org-roam-dblocks.el +++ b/lisp/org-roam-dblocks.el @@ -179,7 +179,7 @@ their blocks updated automatically." ;; blindly clear out the block's content. We then check whether the block ;; content needs to be updated. -(defun org-roam-dblocks--prepare-dblock (fn &rest args) +(define-advice org-prepare-dblock (:around (fn &rest args) org-roam-dblocks-dirty-checks) "Advice to hack org's dblock update flow for the dblock types we define. FN is the advised function, and ARGS are its arguments. @@ -221,9 +221,6 @@ and old content." params)))) -(with-eval-after-load 'org - (advice-add 'org-prepare-dblock :around #'org-roam-dblocks--prepare-dblock)) - ;;;###autoload (defun org-roam-dblocks--write-content (params) (when-let* ((new-content (plist-get params :new-content)))