2

I'm a Vim user trying to learn Spacemacs. In Vim, I execute a Scheme program by typing :mit-scheme < xxx.scm. After the program exits, I can continue editing simply by press Enter.

enter image description here

However, doing this in Spacemacs (in evil mode, of course) would create a new buffer, which I have to kill manually by typing three characters: <space> b d. This is quite inconvenient for me, because I'm a inexperienced programmer who needs to execute programs very frequently while debugging.

enter image description here

How to make execute a program more efficiently in Spacemacs? For example, I want close the output window/buffer in one keystroke. I'm also glad to know if I can replace :mit-scheme < xxx.scm with some key bindings.

3
  • For scheme I think you could use something like Geiser nongnu.org/geiser which should help you do things much easier.
    – caisah
    Feb 11, 2017 at 8:14
  • @caisah Seem that Geiser is shipped with the Scheme layer. However, when I try to use those key bindings, a SPC m is undefined error is thrown.
    – nalzok
    Feb 11, 2017 at 8:30
  • @caisah I've installed the Scheme layer successfully! However, it only prints out the value of the last expression, while I want to see the value of every expression in a .scm file, just like what happens when I feed the whole file to a REPL.
    – nalzok
    Feb 11, 2017 at 8:44

1 Answer 1

1

I've got an workaround: open an terminal in Emacs with the Shell layer. After installing the Shell layer, you can toggle a shell window using SPC '​.

You can execute mit-scheme < xxx.scm in that terminal, which seems more convenient to me than using the Scheme layer

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.