From 245fc50b2eae115144c83ad97c1f9490f525b062 Mon Sep 17 00:00:00 2001 From: stardiviner Date: Wed, 12 Oct 2022 08:32:50 +0800 Subject: [PATCH] lisp/ob-clojure.el: Fix :backend override not work with `org-babel-clojure-backend' * lisp/ob-clojure.el (org-babel-expand-body:clojure): When The source block specified header argument :backend, the global option `org-babel-clojure-backend' value is default 'cider, the `cider-buffer-ns` is not void error. --- lisp/ob-clojure.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index d6f860e98..a6a463b83 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -104,8 +104,10 @@ (defun org-babel-expand-body:clojure (body params) "Expand BODY according to PARAMS, return the expanded body." (let* ((vars (org-babel--get-vars params)) + (backend-override (cdr (assq :backend params))) (ns (or (cdr (assq :ns params)) - (if (eq org-babel-clojure-backend 'cider) + (if (and (not backend-override) + (eq org-babel-clojure-backend 'cider)) (or cider-buffer-ns (let ((repl-buf (cider-current-connection))) (and repl-buf (buffer-local-value -- 2.37.2