(defun round-trip()
(with-temp-buffer
(org-mode)
(insert "text\n\n* heading\n")
(let* ((tree (org-element-parse-buffer))
(str (org-element-interpret-data tree)))
(princ (substring-no-properties str)))))
Running this function interactively it returns a string with one blank line
between "text" and "heading".
But this blank line is missing if I run the function in batch mode with
"emacs -batch -l test.el -f round-trip".
Is this intended? The more I try to understand the differences between
interactive and batch mode, the more I get lost.
Andreas