This worked seamlessly, but at some point, I lost the ability to pass string-type variable values between code blocks in Org Babel. Let’s take the following example:
#+begin_src python :session *PY* :exports code :results output
from sympy import *
x = Symbol('x')
f = x+x/2
a = 7
print(f)
print(latex(f))
print(a)
#+end_src
#+RESULTS:
: 3*x/2
: \frac{3 x}{2}
: 7
#+begin_src python :session *PY* :exports code :results output
print(latex(f))
print(f)
print(a)
#+end_src
#+RESULTS:
: \mathtt{\text{<\_io.TextIOWrapper name='/tmp/babel-KrI2mU/python-FVFmyv' mode='r' encoding='UTF-8'>}}
: <_io.TextIOWrapper name='/tmp/babel-KrI2mU/python-FVFmyv' mode='r' encoding='UTF-8'>
: 7
src_python[:session *PY* :results output]{print(x+x)} {{{results(=2*x=)}}}
src_python[:session *PY* :results output]{print(f)} {{{results(=<_io.TextIOWrapper name='/tmp/babel-KrI2mU/python-eN4EFB' mode='r' encoding='UTF-8'>=)}}}
It seems something must have changed in org-babel and now it's trying to read temporary files as strings. What should I do to localize the problem and restore the functionality? Software version: Emacs 30.1, org-mode 9.7.11
ftoe: it seemsfhas a special meaning for something (although I don't know what).fworks fine. Hmmm... maybe it has something to do with python f-strings? The variable namedfcould be misinterpreted at some point/ treated as f-string prefix or something...?