ob-ipython icon indicating copy to clipboard operation
ob-ipython copied to clipboard

set syntax highlighting for other kernels

Open ssfrr opened this issue 7 years ago • 4 comments

I'm using ob-ipython with a julia kernel, and it seems to be working pretty well (exciting!). One issue is that emacs doesn't know I'm editing julia code inside the block, so the syntax highlighting is for python. I'm creating the block as follows:

#+BEGIN_SRC ipython :session :results raw drawer :kernel julia-0.6
using Plots
gr()
plot(rand(200))
#+END_SRC

Is there any way to have emacs set the syntax mode inside the source block based on the :kernel argument?

ssfrr avatar May 10 '18 04:05 ssfrr

Did you ever end up finding a fix for this?

MasonProtter avatar Jul 29 '18 21:07 MasonProtter

nope, haven't figured out a good solution yet

ssfrr avatar Jul 29 '18 21:07 ssfrr

Apparently, Org just uses the syntax highlighting for whatever it sees right after #+BEGIN_SRC so in this case, I guess it would look for an ipython-mode. I wonder if there's a way to just tell it to use Julia highlighting for all ipython blocks.

MasonProtter avatar Jul 29 '18 21:07 MasonProtter

Syntax highlighting seems to work correctly when using #+BEGIN_SRC jupyter-julia ...

kdjaks avatar Aug 19 '18 22:08 kdjaks