As the title says, I get this error whenever I, or the function I'll show below, call org-babel-tangle
. I'm using a org file to configure emacs, which tangles every time it is saved to my init.el
.
The config regarding org-babel
:
(with-eval-after-load 'org
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(python . t))
(setq org-confirm-babel-evaluate nil)))
;; Templates
(with-eval-after-load 'org
(require 'org-tempo)
(add-to-list 'org-structure-template-alist '("sh" . "src shell"))
(add-to-list 'org-structure-template-alist '("py" . "src python"))
(add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp")))
;; Automatically tangle when saved
(defun tzne/org-babel-tangle-config ()
(when (string-equal (buffer-file-name)
(expand-file-name "~/dotfiles/home/.config/emacs/README.org"))
(let ((org-confirm-babel-evaluate nil))
(org-babel-tangle))))
(add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'tzne/org-babel-tangle-config)))
I'm getting the error:
Debugger entered--Lisp error: (wrong-number-of-arguments (2 . 2) 3)
org-babel-do-load-languages(org-babel-load-languages ((emacs-lisp . t) (python . t)) nil)
(lambda nil (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (python . t)) (setq org-confirm-babel-evaluate nil)))()
eval-after-load(org (lambda nil (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (python . t)) (setq org-confirm-babel-evaluate nil))))
eval-buffer(#<buffer *load*-615341> nil "/home/felipe/.config/emacs/babel.el" nil t) ; Reading at buffer position 170
load-with-code-conversion("/home/felipe/.config/emacs/babel.el" "/home/felipe/.config/emacs/babel.el" nil nil)
load("/home/felipe/.config/emacs/babel.el" nil nil t)
load-file("~/.config/emacs/babel.el")
eval-buffer(#<buffer *load*> nil "/home/felipe/.config/emacs/init.el" nil t) ; Reading at buffer position 24665
load-with-code-conversion("/home/felipe/.config/emacs/init.el" "/home/felipe/.config/emacs/init.el" t t)
load("/home/felipe/.config/emacs/init" noerror nomessage)
startup--load-user-init-file(#f(compiled-function () #<bytecode 0x766eaa9efc2819c>) #f(compiled-function () #<bytecode 0x4d12c0e0e44348b>) t)
command-line()
normal-top-level()
Note: The error comes from a babel.el
file because I changed so many times the babel config I thought it would be safer to put it in a separate file to avoid messing other things up.
Plus, I know almost nothing of elisp, my config is built taking snippets of SystemCrafters and DistroTube.