;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\302\303\304\"\210\302\303\305\"\207" [require ob add-to-list org-babel-tangle-lang-exts ("clojure" . "clj") ("clojurescript" . "cljs")] 3) (defvar org-babel-default-header-args:clojure nil) (defvar org-babel-header-args:clojure '((ns . :any) (package . :any))) (defvar org-babel-default-header-args:clojurescript nil) (defvar org-babel-header-args:clojurescript '((package . :any))) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\310\315\306\307&\207" [custom-declare-variable org-babel-clojure-backend funcall function #[0 "\300\207" [nil] 1] "Backend used to evaluate Clojure code blocks." :group org-babel :type (choice (const :tag "inf-clojure" inf-clojure) (const :tag "cider" cider) (const :tag "slime" slime) (const :tag "Not configured yet" nil)) org-babel-clojure-default-ns #[0 "\300\207" [#1="user"] 1 #1#] "Default Clojure namespace for source block when finding ns failed." string] 8) #@78 Expand BODY according to PARAMS, return the expanded body. (fn BODY PARAMS) (defalias 'org-babel-expand-body:clojure #[514 "\305!\306\236A\206$\307=\203# \206$\310 \211\205\311\301\"\262\202$\n\312\236A\313\211\314\315\316#\306\236A\205=\317\320\"\204Z\313\314\203L\321\202M\322\316\314\323\316##\266\202\202d\317\324\325\326\327##P\313\314\203o\321\202p\322\316\314\323\316##\266\202\330\235\204\206\331\235\203\215\317\332\"\202\216\211*\207" [org-babel-clojure-backend cider-buffer-ns org-babel-clojure-default-ns print-level print-length org-babel--get-vars :ns cider cider-current-connection buffer-local-value :result-params nil replace-regexp-in-string "^[ ]*;+.*$" "" format "(ns %s)\n" "\\`\\([ ]*\n\\)+" "\\`[ \n ]+" "[ \n ]+\\'" "(let [%s]\n%s)" mapconcat #[257 "\300\301@A#\207" [format "%S %S"] 5 "\n\n(fn VAR)"] "\n " "code" "pp" "(clojure.pprint/pprint (do %s))"] 17 (#$ . 1373)]) #@66 Store a trimmed version of S in a variable and return S. (fn S) (defalias 'ob-clojure-inf-clojure-output #[257 "\302\303#\304\302\203\305\202\306\303\302\307\303##\266\202\211 B\210\207" [ob-clojure-inf-clojure-filter-out ob-clojure-inf-clojure-tmp-output replace-regexp-in-string "" nil "\\`\\([ ]*\n\\)+" "\\`[ \n ]+" "[ \n ]+\\'"] 10 (#$ . 2329)]) #@79 Run BODY on EXPANDED code block with PARAMS. (fn EXPANDED PARAMS &rest BODY) (defalias 'ob-clojure-with-temp-expanded '(macro . #[642 "\300\301D\302\303\304\305\306\307\310\311\312\fEDE\313BBBEF\207" [with-temp-buffer insert (goto-char (point-min)) while (not (looking-at "\\s-*\\'")) let* (beg (point)) (end (progn (forward-sexp) (point))) exp org-babel-expand-body:clojure (buffer-substring beg end) (sit-for 0.1)] 15 (#$ . 2700)])) (byte-code "\300\301\302\303#\210\304\301\305\306#\300\207" [put ob-clojure-with-temp-expanded edebug-form-spec (body) function-put lisp-indent-function 2] 4) #@57 Convert list L into a string or a list of list. (fn L) (defalias 'ob-clojure-string-or-list #[257 "\211<\203\211G\300U\203\211@\207\301\302\"\207" [1 mapcar list] 4 (#$ . 3305)]) (put 'ob-clojure-string-or-list 'byte-optimizer 'byte-compile-inline-expand) #@83 Evaluate EXPANDED code block with PARAMS using inf-clojure. (fn EXPANDED PARAMS) (defalias 'ob-clojure-eval-with-inf-clojure #[514 "\3061 \307\310!0\202\210\202\210\203\311\312!!\204S\313 \314\315\316\317\320!\321\"\322$\216\323\236A\324\325 !\203A\326\327\330\331\"#\202B\211 \332\310\"\210db\266)\210\333\334!\210\335\336\236A\206\\ \337Q\340\341\342\"\210\343\344\345!r\211q\210\314\315\346\317\320!\347\"\322$\216c\210eb\210\350\351!\204\234`\352 \210`\353{\343\"\333\354!\210\355!\266\202*\210\333\356!\210\357\341\342\"\210\360\343\361\362\363 !\"\"\211<\203\277\211G\334U\203\277\211@\207\361\364\"\207" [inf-clojure-buffer inf-clojure-comint-prompt-regexp comint-prompt-regexp org-babel-clojure-default-ns ob-clojure-inf-clojure-filter-out ob-clojure-inf-clojure-tmp-output (user-error) require inf-clojure buffer-live-p get-buffer current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 :alias inf-clojure-cmd inf-clojure-project-type replace-regexp-in-string "clojure" format "clojure -A%s" funcall-interactively sit-for 1 "^nil\\|nil$\\|\\s-*" :ns "=>\\s-*" add-hook comint-preoutput-filter-functions ob-clojure-inf-clojure-output nil generate-new-buffer " *temp*" "\301\300!\205 \302\300!\207" [buffer-name kill-buffer] looking-at "\\s-*\\'" forward-sexp org-babel-expand-body:clojure 0.1 inf-clojure-eval-string 0.5 remove-hook delete mapcar #[257 "\211\301\232\206\302\303\304\305#)\266\203?\205\211\207" [inhibit-changing-match-data "" "^Clojure" nil t string-match] 8 "\n\n(fn S)"] reverse list] 10 (#$ . 3573)]) #@77 Evaluate EXPANDED code block with PARAMS using cider. (fn EXPANDED PARAMS) (defalias 'ob-clojure-eval-with-cider #[514 "\3001 \301\302!0\202\210\202\210\303\304\236A!\305\236A\306\204#\307\310!\210\204.\311\211\262\202\264\312\313!r\211q\210\314\315\316\317\320!\321\"\322$\216c\210eb\210\323\324!\204\220`\325 \210`\326{\"\327\330!\210\331\"\332\333\"\206\206\332\334\"\206\206\332\335 \235\204\200\336 \235\203\204\337\202\205\340\"B\262\266\202G*\210\341\342\343\344\345\"\"!\211<\203\256\211G\346U\203\256\211@\262\202\264\344\347\"\262\207" [(user-error) require cider cider-current-connection :target :result-params nil sesman-start-session CIDER "Please reevaluate when nREPL is connected" generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 looking-at "\\s-*\\'" forward-sexp org-babel-expand-body:clojure sit-for 0.1 nrepl-sync-request:eval nrepl-dict-get "root-ex" "ex" "output" "pp" "out" "value" reverse delete #1="" mapcar #[257 "\300\301\302#\207" [replace-regexp-in-string "nil" #1#] 5 "\n\n(fn R)"] 1 list] 14 (#$ . 5205)]) #@77 Evaluate EXPANDED code block with PARAMS using slime. (fn EXPANDED PARAMS) (defalias 'ob-clojure-eval-with-slime #[514 "\3001 \301\302!0\202\210\202\210\303\304!r\211q\210\305\306\307\310\311!\312\"\313$\216c\210\314\315\316ed\"D\317\236A\"*\207" [(user-error) require slime generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 slime-eval swank:eval-and-grab-output buffer-substring-no-properties :package] 9 (#$ . 6367)]) #@63 Execute a block of Clojure code with Babel. (fn BODY PARAMS) (defalias 'org-babel-execute:clojure #[514 "\204\301\302!\210\303\"\304\236A\305\306=\203\307\"\2025\310=\203+\311\"\2025\312=\2055\313\"\262\314\235?\205\222\315\235\204\201\316\235\204\201\317\235\204\201\320\235\204\201\321\235\204\201\322\235\204\201\323\235\204{\324\235\204{\325\235\204{\326\235\203\205\327\235\204\205\202\222\3301\220\331!0\202\222\210\262\207" [org-babel-clojure-backend user-error "You need to customize org-babel-clojure-backend" org-babel-expand-body:clojure :result-params nil inf-clojure ob-clojure-eval-with-inf-clojure cider ob-clojure-eval-with-cider slime ob-clojure-eval-with-slime "none" "scalar" "verbatim" "html" "code" "pp" "file" "output" "raw" "org" "drawer" "table" (error) org-babel-script-escape] 8 (#$ . 6873)]) #@68 Evaluate BODY with PARAMS as ClojureScript code. (fn BODY PARAMS) (defalias 'org-babel-execute:clojurescript #[514 "\300\301B\"\207" [org-babel-execute:clojure (:target . "cljs")] 6 (#$ . 7753)]) (provide 'ob-clojure)