I am anything but an Emacs expert but I use Emacs org-mode quite frequently. I configured Emacs to regognize .org files. After I updated to version 26.1 Emacs does not only recognize .org files any longer:

File mode specification error: (file missing Cannot open load file No such file or directory ob-sh)

but can not even change to org-mode. M-x org-mode gives:

Cannot open load file No such file or directory ob-sh

I did not move my .emacs file or the .emacs.d folder.

Any idea?

  • After I moved my .emacs file and the .emacs.d folder to another location everything works fine. Still I would like to know what I did wrong. Jul 24, 2018 at 16:01
  • FYI you didn't do anything wrong. This was a breaking / backwards-incompatible change in org-mode, and I suspect that a lot of people upgrading to Emacs 26 have been (and will continue to be) tripped up by it.
    – phils
    Jul 25, 2018 at 7:32
  • Here's a tip, unrelated to your problem here: Instead of moving .emacs out of the way, just start up with emacs --no-init-file (on macOS: open -a Emacs --args --no-init-file) instead. (--no-init-file can be shortened to -q.) There is also a flag --no-site-file to stop the loading of site specific files. Jul 25, 2018 at 10:43

1 Answer 1


Emacs 26.1 comes with a much more recent version of org-mode than 25.1. ob-sh was renamed to ob-shell in org-mode 8.2, so you'll need to adjust whichever configuration in .emacs refers to ob-sh, as described in ob-sh removal:

** Incompatible changes

*** ob-sh.el renamed to ob-shell This may require two changes in user config.

  1. In org-babel-do-load-languages, change (sh . t) to (shell . t).

  2. Edit local.mk files to change the value of BTEST_OB_LANGUAGES to remove "sh" and include "shell".

You most likely need to search your config for a call to org-babel-do-load-languages and change sh to shell in the associated list of languages.

  • Thanks for your help. I searched .emacs and .emacs.d for the string ob-sh but I couldn’t find it. Anyway I will restore my config step by step. Jul 24, 2018 at 16:48
  • It could be 'sh' rather than 'ob-sh'. Bisecting your config should find the exact problem.
    – rpluim
    Jul 24, 2018 at 18:11
  • Also emacs --debug-init might pinpoint the line which is causing problems.
    – rpluim
    Jul 24, 2018 at 18:29
  • 2
    @MartinPetersen Look in your config for a call to org-babel-do-load-languages or setting the variable org-babel-load-languages. You will need to change sh to shell in the associated list of languages. If you might need to support both the old and new variants, let us know, as that can also be arranged.
    – phils
    Jul 24, 2018 at 20:55
  • Thanks to all of you I was able to solve the issue. Everything works now as intended. Again, thanks a ton. Jul 25, 2018 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.