;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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'ob) #@46 Default header arguments for js code blocks. (defvar org-babel-default-header-args:js nil (#$ . 422)) #@51 String to indicate that evaluation has completed. (defvar org-babel-js-eoe "org-babel-js-eoe" (#$ . 530)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313\314\315& \207" [custom-declare-variable org-babel-js-cmd funcall function #[0 "\300\207" [#1="node"] 1 #1#] "Name of command used to evaluate js blocks." :group org-babel :version "24.1" :type (choice (const "node") (const "mozrepl") (const "skewer-mode") (const "indium") (const "js-comint")) :safe stringp] 12) #@41 Javascript code to print value of body. (defvar org-babel-js-function-wrapper "require('process').stdout.write(require('util').inspect(function(){%s}()));" (#$ . 1018)) #@128 Execute a block of Javascript code with org-babel. This function is called by `org-babel-execute-src-block'. (fn BODY PARAMS) (defalias 'org-babel-execute:js #[514 "\306\236A\206\307\236A\310\236A\311\312!#\313\230\203g\314\315!\211\316\317\320!!\321\322\323\324\325!\326\"\327$\216r\211q\210\330\230\203E\331 \"\202Fc\210)r\211q\210\332\333\211\333\322%\210*\266\334\331\335\336!#\337\"\262\202O\340\230\203\201\341\342!\210\343!\204{\344!\210\345!\202O\346\307\236A\"\347!\204\223\350\351\"\210\352 \321\322\353\324\325!\354\"\355$\216rq\210\212\356\337C\321\357\360\324\325!\361\"\362\363% B\333\364\365p!!b\210`d{\262|\266\331\366\f\"D\211\203\353\211@\367!c\210\370\333\371\"\210A\266\202\202\324\210 b\210\212\372\373\331\366\f\"!\333\371#\205\372@\333\371#)\204\374\365p!!\210\202\354\364\365p!!b\210\211c\210\203=\375\376\377\201A\373 \206,\337!#\242\"\203=\211\242\322\225\333O\240\210\201B\242@\")\266\202,\262A@\262\201C\236A\313\235?\205\275\201D\235\204\264\201E\235\204\264\201F\235\204\264\201G\235\204\264\201H\235\204\264\201I\235\204\264\201J\235\204\254\201K\235\204\254\201L\235\204\254\201M\235\203\270\201N\235\204\270\202\275\201O!\262)\207" [org-babel-js-cmd org-babel-js-function-wrapper comint-input-filter comint-output-filter-functions org-babel-js-eoe comint-last-input-end :cmd :session :result-type org-babel-expand-body:generic org-babel-variable-assignments:js "none" org-babel-temp-file "js-script-" get-buffer-create generate-new-buffer-name " *temp file*" make-byte-code 0 "\301\300!\205 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 "value" format write-region nil org-babel-eval "%s %s" org-babel-process-file-name "" "*JS REPL*" require indium-repl get-buffer indium-run-node indium-eval org-babel-prep-session:js org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data "\301\300\302\"\207" [set-match-data evaporate] 3 #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] 257 "\300\211\242P\240\207" [] 4 "\n\n(fn TEXT)" process-mark get-buffer-process "%S" org-babel-chomp comint-send-input t re-search-forward regexp-quote accept-process-output string-match replace-regexp-in-string "\n" comint-prompt-regexp "[ \n]+" split-string :result-params "scalar" "verbatim" "html" "code" "pp" "file" "output" "raw" "org" "drawer" "table" org-babel-js-read] 15 (#$ . 1194)]) #@180 Convert RESULTS into an appropriate elisp value. If RESULTS look like a table, then convert them into an Emacs-lisp table, otherwise return the results as a string. (fn RESULTS) (defalias 'org-babel-js-read #[257 "\300;\203-\301\302\"\203-\303\304\"\203-\300\305\306\307\310\306\311\312\306\313\314\306\305\315####P!\202.!\207" [org-babel-read string-prefix-p "[" string-suffix-p "]" "'" replace-regexp-in-string "\\[" "(" "\\]" ")" ",[[:space:]]" " " "\""] 17 (#$ . 3666)]) #@139 Convert VAR into a js variable. Convert an elisp value into a string of js source code specifying a variable of the same value. (fn VAR) (defalias 'org-babel-js-var-to-js #[257 "\211<\203\300\301\302\303#\304Q\207\305\306\307\310\311\"#\207" ["[" mapconcat org-babel-js-var-to-js ", " "]" replace-regexp-in-string "\n" "\\\\n" format "%S"] 7 (#$ . 4159)]) #@93 Prepare SESSION according to the header arguments specified in PARAMS. (fn SESSION PARAMS) (defalias 'org-babel-prep-session:js #[514 "\301!\302!\203Q\303!\204\304\305\"\210\306 \307\310\311\312\313!\314\"\315$\216rq\210\212\316db\210\211\203N\211@\211c\210\317\320\321\"\210\322!\210\323\324!\210db\210A\266\202\202.\210,\210\207" [comint-input-filter org-babel-js-initiate-session org-babel-variable-assignments:js org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] comint-send-input nil t org-babel-comint-wait-for-output sit-for 0.1] 11 (#$ . 4526)]) #@84 Return list of Javascript statements assigning the block's variables. (fn PARAMS) (defalias 'org-babel-variable-assignments:js #[257 "\300\301\302!\"\207" [mapcar #[257 "\300\301@\302A!#\207" [format "var %s=%s;" org-babel-js-var-to-js] 6 "\n\n(fn PAIR)"] org-babel--get-vars] 5 (#$ . 5271)]) #@141 If there is not a current inferior-process-buffer in `SESSION' then create. Return the initialized session. (fn &optional SESSION PARAMS) (defalias 'org-babel-js-initiate-session #[512 "\301\230\203\n\302\303!\207\304\230\2038\305\306!\210\307\304!\211\203-\310\307!!\203-\311!\203-\211\2027\312 \210\313 \210\306 \210\211\207\314\230\203_\305\315!\210\314\310\307!!\203U\311!\203U\211\202^\316\317!\210\320\321!\210\211\207\322\230\203\231\305\323!\210\324 \325\326\327\330\331!\332\"\333$\216\334\335!\210\336!\210p)\262\310!\203\221\320\337!\210\211\202\230\320\340!\210\341!\207\342\230\203\243\343\344!\207\343\345!\207" [org-babel-js-cmd "none" warn "Session evaluation of ob-js is not supported" "*skewer-repl*" require skewer-repl get-buffer org-babel-comint-buffer-livep comint-check-proc httpd-start run-skewer "*Javascript REPL*" js-comint call-interactively run-js sit-for 0.5 "mozrepl" moz current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 run-mozilla nil rename-buffer 0.25 0.5 org-babel-js-initiate-session "node" error "Session evaluation with node.js is not supported" "Sessions are only supported with mozrepl add \":cmd mozrepl\""] 9 (#$ . 5575)]) (provide 'ob-js)