lin Sun <sunl...@yahoo.com> writes:

> Before the error message, the patch will give a try to load the
> associated babel language.
>
> Why does the language exist in the `lang org-babel-load-languages' but
> not be loaded?
> Because the `org-babel-load-languages' are defined as a customer
> variable with  :set 'org-babel-do-load-languages,  the ":set" function
> can only be triggered with function `custom-set-variables`.
> While setq/cl-pushnew `org-babel-load-languages' won't trigger the
> `:set' function, then the error message will be displayed if I run the
> code in the org file.

If we want to solve the problem of setting `org-babel-load-languages'
outside `defcustom', we should also consider unloading and other places
that use `fboundp' to check if babel backend is loaded. IMHO, the
cleanest way will be using `add-variable-watcher'.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to