I returned to an org file this week and found that I am getting
some strange source code block output for R code when I use the
:session header. I have been able to duplicate this with a minimal
init file. I strongly suspect it is some problem at my end but
perhaps folks here can help me know here to look? It occurs with a
minimal emacs initialization.
First, here is a small org file example of the problem. In the
second results block the ">" appears to be treated as a prompt
line to strip from output but only when a session is started. This
happens with any ">" in output when the :session header occurs.
the problem is dramatic when printing tibbles where the column
modes are enclosed in angle brackets.
test.org
** Test org babel R output prompt problem
#+begin_src R :results output
print("<X> <Y> <!>")
print("one <two> three")
print("end")
#+end_src
#+RESULTS:
: [1] "<X> <Y> <!>"
: [1] "one <two> three"
: [1] "end"
#+begin_src R :results output :session "NEW"
print("<X> <Y> <!>")
print("one <two> three")
print("end")
#+end_src
#+RESULTS:
: [1] "<
: <
: <!>"
: [1] "one <
: three"
: [1] "end"
<<<
The second block produces the bad output. This occurs with a
minimal setup.
I start emacs with
emacs -Q -l "~/debugorg.el"
where debugorg.el is:
require 'package)
add-to-list 'package-archives '("melpa" .
"https://melpa.org/packages/") t)
add-to-list 'package-archives '("org" .
"https://orgmode.org/elpa/") t)
package-initialize)
require 'ess-site)
(org-babel-do-load-languages
'org-babel-load-languages
'((R . t)))
<<
emacs version 26.3
org-mode version 9.3.7
ess version 18.10.3snapshot
--