mirror of
https://github.com/chrisbarrett/nursery
synced 2025-08-09 12:57:22 -05:00
s/advice-add/define-advice
This commit is contained in:
@ -179,7 +179,7 @@ their blocks updated automatically."
|
|||||||
;; blindly clear out the block's content. We then check whether the block
|
;; blindly clear out the block's content. We then check whether the block
|
||||||
;; content needs to be updated.
|
;; 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.
|
"Advice to hack org's dblock update flow for the dblock types we define.
|
||||||
|
|
||||||
FN is the advised function, and ARGS are its arguments.
|
FN is the advised function, and ARGS are its arguments.
|
||||||
@ -221,9 +221,6 @@ and old content."
|
|||||||
|
|
||||||
params))))
|
params))))
|
||||||
|
|
||||||
(with-eval-after-load 'org
|
|
||||||
(advice-add 'org-prepare-dblock :around #'org-roam-dblocks--prepare-dblock))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun org-roam-dblocks--write-content (params)
|
(defun org-roam-dblocks--write-content (params)
|
||||||
(when-let* ((new-content (plist-get params :new-content)))
|
(when-let* ((new-content (plist-get params :new-content)))
|
||||||
|
Reference in New Issue
Block a user