I see references to, and examples that use
#+BEGIN_SRC bash
But in my org mode version (elpa, org 20150316) in the menu of customize-variable org-babel-load-languages
, there is no "bash" item, only shell. Attempting to evaluate code such as
#+BEGIN_SRC bash
ls -l
#+END_SRC
I get
org-babel-execute-src-block: No org-babel-execute function for bash!
What am I missing?
Thanks.
For me, I did
(require 'package)
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
as shown on http://orgmode.org/elpa.html to make sure I had the latest Org version (vanilla Emacs ships with its own version of Org). Then I installed the org
package interactively after doing M-x list-packages
. Then I could do
(org-babel-do-load-languages 'org-babel-load-languages
'(
(shell . t)
)
)
which allows #+BEGIN_SRC bash
.
See the value of org-babel-sh-command
(which defaults to "sh"), and only use "sh" as the language.
It seems bash
is covered by the shell
identifier.
Therefore, you have to activate insert “Shell Script” in customize-variable org-babel-load-languages
.
Tested version: 20150810 from MELPA.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With