Comments (11)
Dirty workaround that works for me: replace ob-scala.el
(located in your elpa-folder/scala-mode) with https://raw.githubusercontent.com/tkf/org-mode/master/lisp/ob-scala.el
You can then use :results output
without ensime.
(It will break as soon you update or reinstall scala-mode)
from emacs-scala-mode.
You need to run an Ensime session inside the editor. Try M-x ensime
from emacs-scala-mode.
@hb9 that is helpful indeed!
I knew about a previous ob-scala that was actually meeting this use case scenario,
but I think the current one should still satisfy it (otherwise why replace it at all?).
@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?
from emacs-scala-mode.
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 M-x ensime
in a buffer that is somehow connected to a .ensime
config-file. E.g. in a buffer that belongs to a scala-project with a working ensime configuration. Then you need to also set the directory of the org-code-block via :dir your/scala_project/with/ensime_config
to that project folder. Those steps are at least working for me. It gives me the output of the scala-repl for that code-block.
I still think that my org-files should not depend on .ensime
config-files. I would also appreciate it if the old functionality would be restored.
from emacs-scala-mode.
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?
from emacs-scala-mode.
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
I welcome feedback :)
from emacs-scala-mode.
@ag91 that looks nice, thanks! I now copied the old ob-scala.el
to my .emacs
dir and load it after org. I'm using ammonite for the scala snippets and can work with dependencies that way. I would still like to not be required having a ensime process running to evaluate some snippets.
from emacs-scala-mode.
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.
from emacs-scala-mode.
@eikek How did you get scala snippets working with ammonite?
from emacs-scala-mode.
@ccarlile I think this is the relevant part in my config:
(setq org-babel-scala-command "amm")
(setq org-babel-scala-wrapper-method "%s")
;; load “old” ob-scala
(load-file (concat user-emacs-directory "lisp/ob-scala.el"))
The downside is that it only works with stdout output… It could be improved I guess
from emacs-scala-mode.
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.
from emacs-scala-mode.
Related Issues (20)
- move to gitlab HOT 1
- import symbol at point using CTAGS HOT 4
- face colourings incorrect for scalaz right disjunction
- git CI back online
- Incompatible with aggressive-indent-mode HOT 12
- Fontification of prettified symbols HOT 1
- Remove ob-scala.el since it depends on abandoned ensime HOT 5
- Multi-line Comments not considered as Blocks HOT 7
- Tag a new release HOT 2
- Support Scala 3/Dotty HOT 48
- Don't understand rationale behind syntax hightlighting. HOT 2
- Inappropriate Indentation for classes with keyword names HOT 2
- Learning Emacs link in the README file is broken HOT 1
- imenu fails with error HOT 3
- Allow to customize parameter list indentation level? HOT 1
- Highlighting stopped working entirely in new Emacs versions HOT 3
- Please consider tag a new release.
- Inserting a space char causes error HOT 1
- Navigate function or class definition WRT start and end HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs-scala-mode.