Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Kawa in Emacs

Tags:

emacs

kawa

Are there any modes or resources for Kawa in Emacs? I've checked, but am not able to find any. Mostly, I'd like to be able to run a Kawa REPL inside of Emacs, but some kind of completion/syntax checking would be great too.

like image 615
Koz Ross Avatar asked Mar 18 '23 17:03

Koz Ross


1 Answers

I don't have any prior experience with Kawa, but I have a "universal" way to deal with REPLs: plugin isend + some hacks

  1. Follow the instructions in section 2 and section 3 of this article http://wenshanren.org/?p=351#sec-2 to setup isend (it's a bit tedious, please let me know if you have any problems)

  2. Open a shell in Emacs, assume the buffer name is *shell*

    M-x shell

  3. Open Kawa REPl in *shell*

    CLASSPATH=/usr/local/lib/kawa.jar && export CLASSPATH && java kawa.repl

  4. Create a new buffer test.kawa and turn on lisp-mode M-x lisp-mode (you can use any mode you want)

  5. Associate *shell* with test.kawa M-x isend-associate *shell*

  6. Now type some sexps in test.kawa, select them and press C-Enter to send them *shell* for execution (the cursor won't move)

enter image description here

like image 95
Wenshan Avatar answered Mar 24 '23 08:03

Wenshan