Next: , Previous: , Up: Working with source code   [Contents][Index]


14.7 Languages

Org supports the following languages for the ‘src’ code blocks:

LanguageIdentifierLanguageIdentifier
AsymptoteasymptoteAwkawk
CCC++C++
ClojureclojureCSScss
Ddditaaditaa
GraphvizdotEmacs Calccalc
Emacs Lispemacs-lispFortranfortran
gnuplotgnuplotHaskellhaskell
JavajavaJavascriptjs
LaTeXlatexLedgerledger
LisplispLilypondlilypond
LualuaMATLABmatlab
MscgenmscgenObjective Camlocaml
OctaveoctaveOrg modeorg
OzozPerlperl
PlantumlplantumlProcessing.jsprocessing
PythonpythonRR
RubyrubySasssass
SchemeschemeGNU Screenscreen
Sedsedshellsh
SQLsqlSQLitesqlite
Valavala

Additional documentation for some languages are at https://orgmode.org/worg/org-contrib/babel/languages.html.

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)))

Note that this is not the only way to enable a language. Org also enables languages when loaded with require statement. For example, the following enables execution of clojure code blocks:

(require 'ob-clojure)