lang/org: suppress :async+:session warnings for blacklisted langs

If they're blacklisted, they may have their own :async implementation,
like jupyter does. The warning isn't useful or true for them.
This commit is contained in:
Henrik Lissner 2021-03-02 12:05:36 -05:00
parent 8ccba925dd
commit ce1105b463

View file

@ -230,10 +230,10 @@ Also adds support for a `:sync' parameter to override `:async'."
(let* ((info (or info (org-babel-get-src-block-info))) (let* ((info (or info (org-babel-get-src-block-info)))
(params (org-babel-merge-params (nth 2 info) params))) (params (org-babel-merge-params (nth 2 info) params)))
(cond ((or (assq :sync params) (cond ((or (assq :sync params)
(not (assq :async params))) (not (assq :async params))
(member (car info) org-babel-async-language-blacklist))
(funcall fn arg info params)) (funcall fn arg info params))
((not (member (cdr (assq :session params)) '("none" nil))) ((not (member (cdr (assq :session params)) '("none" nil)))
(message "Org babel :: :session is incompatible with :async. Executing synchronously!")
nil) nil)
((funcall orig-fn fn arg info params)))))) ((funcall orig-fn fn arg info params))))))