emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] before emit an error message, try to load the babel language


From: Ihor Radchenko
Subject: Re: [PATCH] before emit an error message, try to load the babel language
Date: Sat, 22 Apr 2023 12:45:13 +0000

lin Sun <sunlin7@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

[Prev in Thread] Current Thread [Next in Thread]