I had Emacs working pretty well and then I restarted my computer. Now this block of code prevents me from loading my init-files:
(require 'ob-clojure)
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . nil)
(R . t)
(python . t)
(js . t)
(scheme . t)
(C . t)
(clojure . t)
(lilypond . t)
(octave . t)))
I don't know why this would be. I had gotten babel to work fine with R before I restarted. Now I get the message:
byte-code: Symbol's value as variable is void: org-babel-tangle-lang-exts
I grep'd the directory for anything mentioning org-babel and only the above expression came up. That plus the fact that the rest of my init-files code loaded when I got rid of it makes me think that this code is the problem. But why would org-mode be referring to a function I don't have?
Running emacs --debug-init gave:
Debugger entered--Lisp error: (void-function org-babel-do-load-languages) (org-babel-do-load-languages (quote org-babel-load-languages) (quote (... ... ... ... ... ... ... ...))) eval-buffer(#load<2>> nil "/home/kca/.emacs.d/init-org.el" nil t) ; Reading at buffer position 3080 load-with-code-conversion("/home/kca/.emacs.d/init-org.el" "/home/kca/.emacs.d/init-org.el" nil nil) load("init-org") eval-buffer(# nil "/home/kca/.emacs.d/init.el" nil t) ; Reading at buffer position 1464 load-with-code-conversion("/home/kca/.emacs.d/init.el" "/home/kca/.emacs.d/init.el" t t) load("/home/kca/.emacs.d/init" t t) #[nil "\205\264
I tried to check if the right org-mode version was loading:
M-x load-library
org
M-x org-version
=> Org-mode version 7.7
Here is the code in init.el that is loading it:
(add-to-list 'load-path (concat conf-dir "org-7.7/lisp"))
(add-to-list 'load-path (concat conf-dir "org-7.7/contrib/lisp"))
I'm using Emacs 23.2 and Org-7.7. Thanks for your help!
Actually, the trouble was that I didn't understand the org manual instructions. Apparently, I did need to put (require 'org-install) and (require 'ob-tangle) into my init file to get literate programming features. I'm not sure how I got R to work in babel before, though. Oh, well it works now! Hat tip to edenc in the #org-mode irc channel.
Try rebooting again. Then read the rest here, if that didn't help...
Use binary search of your init file to determine just what code you are loading that is the problem.
Make sure you load the source code (*.el
, not *.elc
) for the problematic code.
Set debug-on-error
to non-nil
, so you get a backtrace that tells you something about the context of the error.
If the error is completely contained in some external package, make sure all your files for that package are for the same package version.
If the only thing you changed was restarting, then perhaps the problem is in an environment variable. One guess is that for some reason your variable load-path
does not have the right value, so it isn't loading all the files you need. Or maybe you moved some of that package's code?
HTH. Should get you started toward finding out more about the problem.
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