Emacs org mode needs require, not variable

Hello. Is anybody here using Haskell source code blocks with Emacs org mode?

The org mode manual says, that I should set variable org-babel-do-load-languages to enable Haskell evaluation. However, my installation does not have this variable. I use org mode version 9.1.9 in Emacs 26.3. From reading the org mode release notes, I assume that org-babel-do-load-languages was added in version 7.01. Any ideas why the variable is missing in my installation?

Fortunately, I can still evaluate Haskell source code blocks when I add (require 'ob-haskell) to my Emacs dot file.

The org mode manual says, that I should set variable
org-babel-do-load-languages to enable Haskell evaluation.

The manual (assuming you are referring to 1) tells you to customise
the org-babel-load-languages variables—note how there is no do in
there!

The example

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

uses the org-babel-do-load-languages function (which essentially
just sets org-babel-load-languages and (un)loads the libraries for the
requested languages) to achieve this.

1 Like

Holy cow! You are absolutely right. This is the manual I was referring to and I mixed up the function name and the variable name. I have just customized the variable and it works like a charm.

Thanks a lot!