I have some Java's scripts in a org file. And I use meghanada-mode in java-mode.

Each time I open this org file and do nothing, I get the following error since the mehanada server loaded by java-mode can't not find a project root for these scripts

Meghanada-Server Starting ...
error in process sentinel: meghanada--server-process-sentinel: Error:meghanada-server process stopped: finished
. Please check *meghanada-server-log* buffer

It seems that even I just open the org file org mode has already load all the major modes from org babels.

How can I prevent (or fix) this? I only want org load these things until I call C-c '.


You should take a look at the function org-babel-do-load-languages. I think you'll want something like this:

 '((python . t)
   (C . t)
   (calc . t)
   (latex . t)
   (java . t)
   (ruby . t)
   (lisp . t)
   (scheme . t)
   (shell . t)
   (sqlite . t)
   (js . t)))

Just change the 't' to 'nil' for those you don't want.

  • I don't have (java . t) in it, but it still loads. Jun 3 '18 at 4:01
  • Do you have (java . nil) ?
    – mclear
    Jun 3 '18 at 16:21
  • No, I don't.... Jun 4 '18 at 2:58

Your Answer

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

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