3

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 Answers 3

1

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

1
  • If ob-scheme uses geiser, then it won't work with mit-scheme. Geiser only supports guile and racket.
    – Rptx
    Oct 27, 2014 at 14:25
0

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

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.

Your Answer

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

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