|
|
@ -786,8 +786,19 @@ Org overwrites RET and C-j, so I need to disable the rebinds |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
** Org babel languages |
|
|
|
This code block is linux specific. Loading languages which aren't available seems to be a problem |
|
|
|
This code block is linux specific. Loading languages which aren't available seems to be a problem. |
|
|
|
New: Load languages on demand. I need to test if this works as intended. |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(defadvice org-babel-execute-src-block (around load-language nil activate) |
|
|
|
"Load language if needed" |
|
|
|
(let ((language (org-element-property :language (org-element-at-point)))) |
|
|
|
(unless (cdr (assoc (intern language) org-babel-load-languages)) |
|
|
|
(add-to-list 'org-babel-load-languages (cons (intern language) t)) |
|
|
|
(org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages)) |
|
|
|
ad-do-it)) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
BEGIN_SRC emacs-lisp |
|
|
|
(cond ((eq system-type 'gnu/linux) |
|
|
|
(org-babel-do-load-languages |
|
|
|
'org-babel-load-languages |
|
|
@ -810,7 +821,7 @@ Org overwrites RET and C-j, so I need to disable the rebinds |
|
|
|
) |
|
|
|
)) |
|
|
|
) |
|
|
|
#+END_SRC |
|
|
|
END_SRC |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(defun my-org-confirm-babel-evaluate (lang body) |
|
|
|