emacs-jupyter / jupyter

An interface to communicate with Jupyter kernels.
GNU General Public License v3.0
934 stars 92 forks source link

jupyter source blocks in orgmode don't work with noweb function calls #525

Closed ldartez closed 6 months ago

ldartez commented 7 months ago

In Orgmode I can do the following using normal python source blocks:

#+name: test_print
#+begin_src python :session x :results output
print('hi')
#+end_src

#+begin_src latex :noweb yes
<<test_print()>>
#+end_src

Executing the second src block above results in the expected behaviour: a results block containing "hi". However, if I replace python with jupyter I just get nil as the result. In both cases I'm able to get the first code block to execute correctly.

I've tried removing the :results specifier and using different :display options when using jupyter to no avail. I saw orgmode results being discussed in #31 but as far as I was able to tell, that issue is not directly related.

I imagine that what I'm seeing is related to the fact that jupter rolls its own result insertion mechanism. It would be great to be able to use the jupyter REPL and have access to noweb function calls in orgmode.

ldartez commented 7 months ago

related #40