-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I run scala code blocks in org-mode? #148
Comments
You need to run an Ensime session inside the editor. Try |
Dirty workaround that works for me: replace You can then use (It will break as soon you update or reinstall scala-mode) |
@hb9 that is helpful indeed! @khayyamsaleem I have actually tried and is not working: maybe I am doing something wrong. If it is working for you, could you list the steps you are following? |
You need to run I still think that my org-files should not depend on |
I also have problems with this new implementation. My scala snippets are not working anymore, because it wants me to start ensime now. Is it now required to have a working and running ensime to execute scala source blocks in org files? |
By the way, I have automated the setup to use org and ensime together. Maybe you could find it useful as well: https://github.com/ag91/EasyOrgEnsime |
@ag91 that looks nice, thanks! I now copied the old |
Is there any progress on this? I just need a few throwaway lines in scala as part of a org-mode notebook being passed around. It seems counterproductive for org-mode to offload their ob-scala.el to a third party which is not tied to their release schedule. |
@eikek How did you get scala snippets working with ammonite? |
@ccarlile I think this is the relevant part in my config:
The downside is that it only works with stdout output… It could be improved I guess |
It's a great pity that this is not accommodated out the box. Orgmode is a big part of the reason I use Emacs, and I end up using other languages (js, python, elisp), specifically not Scala, for org blocks in order to achieve things. |
- new ob-scala requires a running ensime session (which is a bad idea imho) - see hvesalai/emacs-scala-mode#148
Thanks for the great software guys.
I am a heavy user of org mode and I would like to evaluate scala blocks.
Is there an explanation somewhere on how to do it?
I would like to be able to
C-c C-c
on a block such this:And get something like:
However if I try, I get
Not connected. M-x ensime to connect
.Now I understand I need an Ensime session running, but after setting up one for a sample project (build.sbt and running
sbt ensimeConfig
), it still does not work.Am I missing something? Is there any tutorial/docs on how to do this?
Ideally I would like to run the previous source block just with the Scala binary,
and I would like to have the option to run the great Ensime with something like:
And using the session to refer to the Ensime connection in future blocks.
Thanks again!
The text was updated successfully, but these errors were encountered: