Revert buffers after editing links

This commit is contained in:
Chris Barrett
2022-09-14 11:38:20 +12:00
parent 82349b640b
commit b9c15a587f

View File

@@ -122,7 +122,13 @@ It is called with the new node as the current buffer."
(when (looking-at org-link-any-re)
(replace-match replacement t t))))
(write-region (point-min) (point-max) file))))
(write-region (point-min) (point-max) file)))
(pcase-dolist (`(,file . ,_) backlinks-by-file)
(when-let* ((buf (find-buffer-visiting file)))
(with-current-buffer buf
(revert-buffer t t)))))
;; Tell org-roam that files changed behind its back.
(org-roam-db-sync))