I fear I am not good enough at Emacs-lisp to provide a quality solution that Julia desserves. I can do ugly fix, but ob-julia.el would need more cleaning, update etc…
For the moment I use the “fix” I described in Stackoverflow. I am also testing ob-ipython. I did not know this Emacs package and it is the very first time I use it.
# Example with ob-julia.el
#+begin_src julia :session :results output drawer
rand(2,3)
#+end_src
#+RESULTS:
:RESULTS:
2×3 Array{Float64,2}:
0.156528 0.467421 0.919801
0.134619 0.22031 0.861505
:END:
# Example with ob-ipython.el
#+begin_src jupyter-julia :session :results value drawer
rand(2,3)
#+end_src
#+RESULTS:
:RESULTS:
# Out[37]:
#+BEGIN_EXAMPLE
2×3 Array{Float64,2}:
0.118136 0.345331 0.332554
0.997373 0.310063 0.908705
#+END_EXAMPLE
:END:
Compared to ob-julia I am suprised that ob-ipython wraps everything in a EXAMPLE block. If I understand well the ob-ipython code I have the feeling this is not customizable. IMHO this default behavior is maybe not the right choice, as it is very easy to wrap babel output (the :wrap “EXAMPLE” as follows)
# Example with ob-julia.el + "EXAMPLE" block wrapping of the output
#+begin_src julia :session :results output drawer :wrap "EXAMPLE"
rand(2,3)
#+end_src
#+RESULTS:
#+BEGIN_EXAMPLE
2×3 Array{Float64,2}:
0.831512 0.255936 0.1748
0.20797 0.470198 0.131195
#+END_EXAMPLE