2

In org-mode:

#+BEGIN_SRC calc :var x=5 :var y=2
2+a*x**y
#+END_SRC

returns

No org-babel-execute function for calc!

How do I enable calc for org-babel-execute?

Dan
  • 32,584
  • 6
  • 98
  • 168
Draif Kroneg
  • 260
  • 4
  • 15

2 Answers2

8

As described in org documentation:

By default, only 'emacs-lisp' is enabled for evaluation. To enable or disable other languages, customize the 'org-babel-load-languages' variable either through the Emacs customization interface, or by adding code to the init file as shown next:

In this example, evaluation is disabled for 'emacs-lisp', and enabled for `R'.

(org-babel-do-load-languages
  'org-babel-load-languages
  '((emacs-lisp . nil)
    (R . t)))

So here you could do the following:

(org-babel-do-load-languages
   'org-babel-load-languages
      '((calc . t)))
JeanPierre
  • 7,323
  • 1
  • 18
  • 37
0

To add to JeanPierre's answer, you can run M-x customize-variable with org-babel-load-languages to modify the list from Emacs.

user1338062
  • 123
  • 4