Skip to content

Commit

Permalink
lisp/ob-clojure.el: Fix :backend override not work with `org-babel-cl…
Browse files Browse the repository at this point in the history
…ojure-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.
  • Loading branch information
stardiviner authored and yantar92 committed Oct 13, 2022
1 parent 4c06418 commit 601ce68
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lisp/ob-clojure.el
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@
(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)))
(org-babel-clojure-backend
(cond
(backend-override (intern backend-override))
(org-babel-clojure-backend org-babel-clojure-backend)
(t (user-error "You need to customize `org-babel-clojure-backend'
or set the `:backend' header argument"))))
(ns (or (cdr (assq :ns params))
(if (eq org-babel-clojure-backend 'cider)
(or cider-buffer-ns
Expand Down

0 comments on commit 601ce68

Please sign in to comment.