This is my config for org-babel:
(use-package org
:mode (("\\.org$" . org-mode))
:ensure org-plus-contrib
:config
(org-babel-do-load-languages 'org-babel-load-languages
'((emacs-lisp . t)
(python . t)
(shell . t)
(jupyter . t))))
It works when it is located in my init.el
. However when I relocate it in another file org.el
and load it in init.el
with:
(load-user-file "org.el")
I have got the error:
Symbol's value as variable is void: org-src-lang-modes
Also I have the line
;;; -*- lexical-binding: t -*-
and the same encoding in both files (init.el
,org.el
).
So, could you explain me what happens?
UPDATE.
Just for clarification this is my load-user-file
:
(defun load-user-file (file)
(interactive "f")
"Load a file in current user's configuration directory"
(load-file (expand-file-name file user-init-dir)))