;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302\303\304#\210\305\306\303\307\310\311\312\313&\210\314\315\303\316\317\320\312\306&\210\314\321\303\322\317\323\312\306&\207" [require ob-clojure cider nil t custom-declare-group ob-clojure-literate "Clojure's Org-mode Literate Programming." :prefix "ob-clojure-literate-" :group ob-babel custom-declare-variable ob-clojure-literate-auto-jackin-p "Auto jack in ob-clojure project.\nDon't auto jack in by default for not rude." :type boolean ob-clojure-literate-project-location "The location for `ob-clojure-literate' scaffold project.\nIf it is nil, then `cider-jack-in' will jack-in outside of Clojure project.\nIf it is a directory, `ob-clojure-literate' will try to create Clojure project automatically." string] 8) (defvar ob-clojure-literate-session nil) (defvar ob-clojure-literate-original-ns nil) (defvar ob-clojure-literate-session-ns nil) (defvar ob-clojure-literate-cider-connections nil) #@53 The default session name for `ob-clojure-literate'. (custom-declare-variable 'ob-clojure-literate-default-session "*cider-repl localhost*" '(#$ . 1024) :type 'string :group 'ob-clojure-literate) #@40 Return t if have any CIDER connection. (defalias 'ob-clojure-literate-any-connection-p #[nil "\301 ??\205??\205\211\302\230\262?\207" [ob-clojure-literate-session cider-connections ""] 3 (#$ . 1225)]) #@62 Return a list of available started CIDER REPL sessions list. (defalias 'ob-clojure-literate-get-session-list #[nil "\300\301\302\303!\"\207" [mapcar buffer-name default-value cider-connections] 4 (#$ . 1439)]) #@36 Set session name for buffer local. (defalias 'ob-clojure-literate-set-session #[nil "\302 G\303U\203\302 \235\203\304\301!\210\211\207\305 \203(\304\301!\210\306\307\302 \"\211\207\304\301!\210\211\207" [ob-clojure-literate-default-session ob-clojure-literate-session ob-clojure-literate-get-session-list 1 make-local-variable ob-clojure-literate-any-connection-p completing-read "Choose ob-clojure-literate :session : "] 3 (#$ . 1655)]) #@100 Specify ob-clojure header argument :session with value selected from a list of available sessions. (defalias 'ob-clojure-literate-specify-session #[nil "\301 @\211\302\230\203#\303\304\305\301 8\"@\203#\306\307\310\311\312\313\314 \"\"\"\202&\315\316!)\207" [lang org-babel-get-src-block-info "clojure" seq-filter #[(header-argument) "@\301=\205 A??\207" [header-argument :session] 2] 2 org-babel-insert-header-arg "session" format "\"%s\"" completing-read "Choose :session for ob-clojure-literate: " ob-clojure-literate-get-session-list message "This function only used in `clojure' src block."] 8 (#$ . 2111) nil]) #@70 Auto setup ob-clojure-literate scaffold and jack-in Clojure project. (defalias 'ob-clojure-literate-auto-jackin #[nil "\204\306\307! \235\203\310\311!\207\312\313!\207??\205n\314\315!!\204.\316\317\"\210\320\321!\210)\322 \203@ \203@\323 \306 !\"\206F \206F\324 ?\205n\325 G\326U\205V\f\325 \235?\205n\327 \330\216\331\315\332P!!\210r\333q\210\312 +\207" [ob-clojure-literate-project-location cider-connections default-directory ob-clojure-literate-session ob-clojure-literate-default-session #1=#:wconfig get-buffer "*cider-repl localhost*" message "CIDER default session already launched." cider-jack-in nil file-directory-p expand-file-name make-directory t shell-command "lein new ob-clojure" cider-connected-p seq-contains ob-clojure-literate-any-connection-p ob-clojure-literate-get-session-list 1 current-window-configuration #[nil "\301!\207" [#1# set-window-configuration] 2] find-file "ob-clojure/src/ob_clojure/core.clj" "core.clj"] 4 (#$ . 2741) nil]) #@80 Set buffer local `cider-connections' for `ob-clojure-literate-mode' `TOGGLE?'. (defalias 'ob-clojure-literate-set-local-cider-connections #[(toggle\?) "\203 \303\301!\204\304\301!\210\304\301!\210\n\211\207\305\301!\207" [toggle\? cider-connections ob-clojure-literate-cider-connections local-variable-if-set-p make-local-variable kill-local-variable] 2 (#$ . 3733)]) #@98 Fix the issue that `cider-current-ns' try to invoke `clojure-find-ns' to extract ns from buffer. (defalias 'ob-clojure-literate-set-ns #[(body params) "\305 \203\306 r q\210\n)\307\302!\210\310\f\236A\206 \311\312\313\n\"!\207" [ob-clojure-literate-original-ns ob-clojure-literate-session cider-buffer-ns ob-clojure-literate-session-ns params ob-clojure-literate-any-connection-p cider-current-ns make-local-variable :ns message format "ob-clojure-literate: current CIDER ns is [%s]."] 4 (#$ . 4114)]) #@100 Set buffer local `org-babel-default-header-args:clojure' for `ob-clojure-literate-mode' `TOGGLE?'. (defalias 'ob-clojure-literate-set-local-session #[(toggle\?) "\203\303 \304\302!\204\305\302!\210\306\302\307 B\"\207\304\302!\204\"\305\302!\210\310\311\312\313\n\"\"\211\207" [toggle\? ob-clojure-literate-session org-babel-default-header-args:clojure ob-clojure-literate-set-session local-variable-if-set-p make-local-variable add-to-list :session delq t mapcar #[(cons) "@\301=\203 \302\207\207" [cons :session t] 2]] 5 (#$ . 4630)]) #@425 Inject Clojure code into `BODY' in `ARGS'. It is used to change Clojure currently working directory in a FAKE way. And generate inline graphics image file link result. Use header argument like this: :results graphics :file "incanter-plot.png" Then you need to assign image variable to this :file value like: (def incanter-plot (histogram (sample-normal 1000))) *NOTE*: Currently only support Incanter's `save' function.  (defalias 'ob-clojure-literate-inject-code #[(args) "@A@\306\n\236A\307 \205\310\307 ! \205\311\312 !!\313\n\236A\314\n\236A\211\2054\315!\316\317\n\236A\235\320\321 \203W\322\312 !!\204W\323\324\325 \"!\210\203i\324\326 P#!\210 \n. D\207" [args body params dir default-directory directory :dir buffer-file-name file-name-directory file-name-as-directory expand-file-name :results :file file-name-base "graphics" :result-params #[(code) "\302 Q\211\207" [code body "\n"] 3] #[(code) "\302 \302R\211\207" [body code "\n"] 4] file-directory-p warn format "Target directory %s does not exist, please create it." "(save %s \"%s\")" result-type file file-name graphics-result prepend-to-body append-to-body] 7 (#$ . 5185)]) #@97 Support :results graphics :dir "data/images" :file "incanter-plot.png" reset `RESULT' to `nil'. (defalias 'ob-clojure-literate-support-graphics-result #[(result) "\3048\305\306 \236A\235\211\203\307 *\207" [info params graphics-result result 2 "graphics" :result-params nil] 4 (#$ . 6375)]) #@40 Keymap for `ob-clojure-literate-mode'. (defvar ob-clojure-literate-mode-map (make-sparse-keymap) (#$ . 6678)) (byte-code "\301\302\303#\210\301\304\305#\207" [org-babel-map define-key [134217843] ob-clojure-literate-specify-session [134217834] ob-clojure-literate-auto-jackin] 4) #@59 Enable Org-mode buffer locally for `ob-clojure-literate'. (defalias 'ob-clojure-literate-enable #[nil "??\205) \303=\205)\304\n!\210\305\n!\210\306\307\310\311#\210\306\312\313\314#\210\306\307\315\316#\210\317\320!\207" [cider-connections major-mode ob-clojure-literate-mode org-mode ob-clojure-literate-set-local-cider-connections ob-clojure-literate-set-local-session advice-add org-babel-execute:clojure :before ob-clojure-literate-set-ns org-babel-expand-body:clojure :filter-args ob-clojure-literate-inject-code :filter-return ob-clojure-literate-support-graphics-result message "ob-clojure-literate minor mode enabled."] 4 (#$ . 6966)]) #@60 Disable Org-mode buffer locally for `ob-clojure-literate'. (defalias 'ob-clojure-literate-disable #[nil "\303\304\305\"\210\303\306\307\"\210\303\304\310\"\210\311\301!\210\312\n!\210\313\n!\210\314\315!\207" [ob-clojure-literate-original-ns cider-buffer-ns ob-clojure-literate-mode advice-remove org-babel-execute:clojure ob-clojure-literate-set-ns org-babel-expand-body:clojure ob-clojure-literate-inject-code ob-clojure-literate-support-graphics-result make-local-variable ob-clojure-literate-set-local-cider-connections ob-clojure-literate-set-local-session message "ob-clojure-literate minor mode disabled."] 3 (#$ . 7619)]) (byte-code "\203\301 \210\301\207" [ob-clojure-literate-auto-jackin-p ob-clojure-literate-auto-jackin] 1) #@117 Non-nil if Ob-Clojure-Literate mode is enabled. Use the command `ob-clojure-literate-mode' to change this variable. (defvar ob-clojure-literate-mode nil (#$ . 8367)) (make-variable-buffer-local 'ob-clojure-literate-mode) #@599 A minor mode to toggle `ob-clojure-literate'. This is a minor mode. If called interactively, toggle the `Ob-Clojure-Literate mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `ob-clojure-literate-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. (defalias 'ob-clojure-literate-mode #[(&optional arg) "\305  \306=\203\n?\202 \247\203 \307W\203\310\202\311\312\303!\2032\313\302 \"\n\2032\302 B\n\203<\314 \210\202?\315 \210\316\317\n\203I\320\202J\321\"\210\322\323!\203o\305 \203^\305 \232\203o\324\325\326\n\203j\327\202k\330\f#\210))\331 \210\n\207" [#1=#:last-message arg ob-clojure-literate-mode local-minor-modes local current-message toggle 1 nil t boundp delq ob-clojure-literate-enable ob-clojure-literate-disable run-hooks ob-clojure-literate-mode-hook ob-clojure-literate-mode-on-hook ob-clojure-literate-mode-off-hook called-interactively-p any " in current buffer" message "Ob-Clojure-Literate mode %sabled%s" "en" "dis" force-mode-line-update] 4 (#$ . 8595) (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) 'toggle))]) (defvar ob-clojure-literate-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\313\310\211%\210\314\315!\207" [ob-clojure-literate-mode-map ob-clojure-literate-mode-hook variable-documentation put "Hook run after entering or leaving `ob-clojure-literate-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode ob-clojure-literate-mode " clj-lp" provide ob-clojure-literate] 6)