Commit Graph

10 Commits

Author SHA1 Message Date
stardiviner 4bd7df57d0 ob-clojure-literate: Don't enable ob-clojure-literate-mode by default.
* contrib/lisp/ob-clojure-literate.el (ob-clojure-literate-auto-jackin):
Handle the case that detect cider-jack-in is executed but not connected,
and ob-clojure-literate-mode is enabled already.

* contrib/lisp/ob-clojure-literate.el (ob-clojure-literate-mode): Don't
  enable ob-clojure-literate-mode by default.
2018-05-03 21:54:18 +02:00
stardiviner 280e3c9b53 ob-clojure-literate: Remove dependency on Dash
* contrib/lisp/ob-clojure-literate.el (ob-clojure-literate-get-session-list):
(ob-clojure-literate-set-session):
(ob-clojure-literate-auto-jackin):
(ob-clojure-literate-set-local-cider-connections): Remove dependency
on Dash library.
2018-04-16 12:09:12 +02:00
stardiviner 2a315ab59d ob-clojure-literate: Handle no :file specified file is nil case
* ob-clojure-literate.el (ob-clojure-literate-inject-code): Handle
  no :file specified file is nil case.
2018-04-14 18:21:59 +02:00
stardiviner 46d841d064 * ob-clojure-literate: Get session from global connections list
* contrib/lisp/ob-clojure-literate.el (ob-clojure-literate-get-session-list):
(org-babel-map): Get session from global connections list.
(ob-clojure-literate-specify-session): Renamed from
`ob-clojure-literate-specify-session-header-argument'.
2018-04-14 18:21:59 +02:00
stardiviner 8835ee750e * ob-clojure-literate: Support vars initialization when prepare session
* contrib/lisp/ob-clojure-literate.el (org-babel-clojure-var-to-clojure):
(org-babel-variable-assignments:clojure): Support vars initialization
when prepare session.
2018-04-14 17:54:02 +02:00
stardiviner 0104bea3ad * ob-clojure-literate: Support use :ns header argument
* contrib/lisp/ob-clojure-literate.el (ob-clojure-literate-set-ns):
  Renamed from `ob-clojure-literate-cider-do-not-find-ns'
(ob-clojure-literate-enable):
(ob-clojure-literate-disable): Support use :ns header argument.
2018-04-14 17:52:58 +02:00
stardiviner 5a1a1f3d9a * ob-clojure-literate: CIDER jack-in outside of project by default
* contrib/lisp/ob-clojure-literate.el (ob-clojure-literate-project-location):
(ob-clojure-literate-default-session):
(ob-clojure-literate-auto-jackin): CIDER jack-in outside of project by
default.
2018-04-14 17:51:15 +02:00
stardiviner 6cf5fc0fc1 ob-clojure-litterate: Fix trigger functions.
* ob-clojure-literate.el (ob-clojure-literate-enable,
  ob-clojure-literate-disable): Put advice into
  ob-clojure-literate-mode trigger functions.
2018-03-14 17:03:33 +01:00
stardiviner 6f976f1947
* ob-clojure-literate.el support graphics inline image link result.
(ob-clojure-literate-inject-code): save Clojure image variable to :file.

(ob-clojure-literate-support-graphics-result): fix src block does handle
graphics file result issue.

Use it like this:

,#+begin_src clojure :cache no :dir "data/images" :results graphics :file "ob-clojure-literate.png"
(use '(incanter core stats datasets charts io pdf))
(def ob-clojure-literate (histogram (sample-normal 1000)))
,#+end_src
2018-03-02 14:22:44 +08:00
stardiviner 90dfba15a6
* ob-clojure-literate.el (Clojure Literate Programming in Org-mode): Add.
Stable version.
2018-02-10 08:31:06 +08:00