Live sync is not working for me. After exiting live sync the transclusion is incomplete.
Start from emacs -Q and run this code:
(progn
(find-file "aaa.org")
(insert "* AAA\n1234\n")
(split-window-below)
(find-file "bbb.org")
(insert "#+transclude: [[./aaa.org::*AAA]]\n")
(goto-char (point-min))
(org-transclusion-add)
(next-line)
(org-transclusion-live-sync-start)
;; (insert"aaa\nbbb\n") ;; doesn't work with current main branch
(self-insert-command 3 ?a)
(self-insert-command 1 ?\n)
(self-insert-command 3 ?b)
(self-insert-command 1 ?\n)
(org-transclusion-live-sync-exit)
)
As you see the transclusion is incomplete.
To fix it I have to reset the org cache and refresh the transclusion, like this:
(with-current-buffer "aaa.org"
(org-element-cache-reset))
(with-current-buffer "bbb.org"
(goto-char (point-min))
(org-transclusion-refresh))
Now the transclusion is complete.
Live sync is not working for me. After exiting live sync the transclusion is incomplete.
Start from
emacs -Qand run this code:As you see the transclusion is incomplete.
To fix it I have to reset the org cache and refresh the transclusion, like this:
Now the transclusion is complete.