%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/org/ |
Current File : //usr/local/share/emacs/27.2/lisp/org/ob-js.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; 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\203e \314\315!\211\316\317!\320\321\322\323\324!\325\"\326$\216r\211q\210\327\230\203C \330 \"\202D c\210)r\211q\210\331\332\211\332\321%\210*\266\333\330\334\335!#\336\"\262\202M\337\230\203 \340\341!\210\342!\204y \343!\210\344!\202M\345\307\236A\"\346!\204\221 \347\350\"\210\351 \320\321\352\323\324!\353\"\354$\216rq\210\212\355\336C\320\356\357\323\324!\360\"\361\362%B\332\363\364p!!b\210`d{\262|\266\330\365\f\"D\211\203\351 \211@\366!c\210\367\332\370\"\210A\266\202\202\322 \210 b\210\212\371\372\330\365\f\"!\332\370#\205\371@\332\370#)\204\373\364p!!\210\202\352 \363\364p!!b\210\211c\210\203;\374\375\376\377\372 \206(\336!#\242\"\203;\201A \242\321\225\"\240\210\201B \242@\")\266\202,\262A@\262\201C \236A\313\235?\205\273\201D \235\204\262\201E \235\204\262\201F \235\204\262\201G \235\204\262\201H \235\204\262\201I \235\204\262\201J \235\204\252\201K \235\204\252\201L \235\204\252\201M \235\203\266\201N \235\204\266\202\273\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-" generate-new-buffer " *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" "[ \n]+" comint-prompt-regexp substring 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 (#$ . 3643)]) #@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 (#$ . 4136)]) #@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 (#$ . 4503)]) #@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 (#$ . 5248)]) #@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 (#$ . 5552)]) (provide 'ob-js)