I'm new to spacemacs. I did a fresh install following these instructions. When i try to evaluate a shell src block, i get the following message:

org-babel-execute-src-block: No org-babel-execute function for sh!
  • I tried adding the following lines inside ~/.spacemacs under defun dotspacemacs/user-config ():

    (with-eval-after-load 'org
         (python . t)
         (sh . t)))
  • Tried shell or bash instead of sh in the above code (replacing the language identifier in the src block respectively).

  • Also tried adding the above code without the with-eval-after-load 'org under defun dotspacemacs/user-init ()

  • When i do M-x load-file i get a done message, but when I try M-x dotspacemacs/sync-configuration-layers i get this message:

    helm-M-x-execute-command: Cannot open load file: No such file or directory, ob-bash

  • Spacemacs v.0.300.0

  • GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2020-11-30

  • What does C-h v org-babel-load-languages give you as the value of the variable? – NickD Mar 11 at 16:32
  • Try (shell . t) instead of (sh . t) . The name of the library is ob-shell. – NickD Mar 12 at 2:37
  • Sorry it took me a while to reply. I solved it using this FAQ. Deleted the .emacs.d/elpa directory and set dotspacemacs-elpa-https to nil and now it works good. – J.Doe Mar 26 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.