Skip to content

Live sync: transclusion incomplete #279

Description

@AndreasMatthias

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions