3
votes

I have a code block in org mode:

#+BEGIN_SRC scheme
  (define (even? n)
    (= (remainder n 2) 0))

  (even? 3)
#+END_SRC

When I do C-c C-c to evaluate the code, I get the error '/bin/bash: guile: command not found'

I guess this is because org-babel expects that the scheme implementation installed is guile, but I have mit-scheme which I can run from the command line just by calling 'scheme'.

How do I get org-babel to use mit-scheme instead of trying to use guile?

This similar question doesn't solve my issue as the answer is very specific to racket.

3

3 Answers

1
votes

Try to change the geiser-default-implementation variable - that's used by ob-scheme package to evaluate Scheme code blocks...

0
votes

It's not really a solution, but I gave up on trying to get org-mode code block evaluation working with mit-scheme and instead I just switch to scheme-mode when I want to evaluate my code and then do C-c C-e to evaluate each expression.

0
votes

Org-mode is not compatible with MIT-Scheme by default (the last time I checked it didn't work great with other Scheme either, for example try to evaluate the code returning #t or #f). But there is a workaround that makes it possible to make them work together with one culprit: the result will always be just a string-result (instead of, for example, table for list-of-lists result).

See the blog-post and repository for how to set them up.