%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/org/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/org/ob-octave.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.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\207" [require ob org-macs] 2)
(defvar org-babel-default-header-args:matlab nil)
(defvar org-babel-default-header-args:octave nil)
#@53 Shell command to run matlab as an external process.
(defvar org-babel-matlab-shell-command "matlab -nosplash" (#$ . 573))
#@53 Shell command to run octave as an external process.
(defvar org-babel-octave-shell-command "octave -q" (#$ . 701))
#@150 If non-nil use matlab-shell-run-region for session evaluation.
  This will use EmacsLink if (matlab-with-emacs-link) evaluates
  to a non-nil value.
(defvar org-babel-matlab-with-emacs-link nil (#$ . 823))
(defvar org-babel-matlab-emacs-link-wrapper-method "%s\nif ischar(ans), fid = fopen('%s', 'w'); fprintf(fid, '%%s\\n', ans); fclose(fid);\nelse, save -ascii %s ans\nend\ndelete('%s')\n")
(defvar org-babel-octave-wrapper-method "%s\nif ischar(ans), fid = fopen('%s', 'w'); fprintf(fid, '%%s\\n', ans); fclose(fid);\nelse, dlmwrite('%s', ans, '\\t')\nend")
(defvar org-babel-octave-eoe-indicator "'org_babel_eoe'")
(defvar org-babel-octave-eoe-output "ans = org_babel_eoe")
#@62 Execute a block of matlab code with Babel.

(fn BODY PARAMS)
(defalias 'org-babel-execute:matlab #[514 "\300\301#\207" [org-babel-execute:octave matlab] 6 (#$ . 1507)])
#@80 Execute a block of octave code with Babel.

(fn BODY PARAMS &optional MATLABP)
(defalias 'org-babel-execute:octave #[770 "\300\301\302\203\303\202\f\304\"!\305\236A\"\306\236A\307\310!#\3111+\312!0\202-\210\313\314\203C\315\316\317\301\320\"E\321#\202D$?\205h\322\323\324\n\236A\325\236A\"\323\326\236A\327\f\236A\"#\207" [intern format "org-babel-%s-initiate-session" "matlab" "octave" :session :result-type org-babel-expand-body:generic org-babel-variable-assignments:octave (error) org-babel-graphical-output-file nil org-babel-octave-evaluate mapconcat identity "set (0, \"defaultfigurevisible\", \"off\");" "print -dpng %s" "\n" org-babel-reassemble-table org-babel-pick-name :colname-names :colnames :rowname-names :rownames] 16 (#$ . 1684)])
#@59 Prepare SESSION according to PARAMS.

(fn SESSION PARAMS)
(defalias 'org-babel-prep-session:matlab #[514 "\300\301#\207" [org-babel-prep-session:octave matlab] 6 (#$ . 2474)])
#@80 Return list of octave statements assigning the block's variables.

(fn PARAMS)
(defalias 'org-babel-variable-assignments:octave #[257 "\300\301\302!\"\207" [mapcar #[257 "\300\301@\302A!#\207" [format "%s=%s;" org-babel-octave-var-to-octave] 6 "\n\n(fn PAIR)"] org-babel--get-vars] 5 (#$ . 2658)])
(defalias 'org-babel-variable-assignments:matlab 'org-babel-variable-assignments:octave)
#@166 Convert an emacs-lisp value into an octave variable.
Converts an emacs-lisp variable into a string of octave code
specifying a variable of the same value.

(fn VAR)
(defalias 'org-babel-octave-var-to-octave #[257 "\211<\203\300\301\302\211@<\203\303\202\304#\305Q\207\211;\203\"\306\307\"\207\306\310\"\207" ["[" mapconcat org-babel-octave-var-to-octave "; " "," "]" format "'%s'" "%s"] 6 (#$ . 3055)])
#@111 Prepare SESSION according to the header arguments specified in PARAMS.

(fn SESSION PARAMS &optional MATLABP)
(defalias 'org-babel-prep-session:octave #[770 "\301#\302!\303!\204\304\305\"\210\306 \307\310\311\312\313!\314\"\315$\216rq\210\212\316\317\307\320\321\312\313!\322\"\323\324%\"\210,\210\207" [comint-input-filter org-babel-octave-initiate-session org-babel-variable-assignments:octave 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)"] mapc 257 "\301\210\211c\210\302\303\304\"\210\305\300!\207" [1 comint-send-input nil t org-babel-comint-wait-for-output] 4 "\n\n(fn VAR)"] 13 (#$ . 3475)])
#@180 Create a matlab inferior process buffer.
If there is not a current inferior-process-buffer in SESSION then
create.  Return the initialized session.

(fn &optional SESSION PARAMS)
(defalias 'org-babel-matlab-initiate-session #[512 "\300\301#\207" [org-babel-octave-initiate-session matlab] 6 (#$ . 4267)])
#@189 Create an octave inferior process buffer.
If there is not a current inferior-process-buffer in SESSION then
create.  Return the initialized session.

(fn &optional SESSION PARAMS MATLABP)
(defalias 'org-babel-octave-initiate-session #[768 "\211\203\301\302!\210\202\301\303\304\305#\204\301\306!\210\307\230?\205t\206+\211\203*\310\202+\311\312!\2035\211\202r\313 \314\315\316\317\320!\321\"\322$\216\203Q\204T\323 \210\202T\324 \210\325\326!\203a\327!\202l;\203j\202l\327 !\210p)\262\262\207" [org-babel-matlab-with-emacs-link require matlab octave-inf nil noerror octave "none" "*Inferior Matlab*" "*Inferior Octave*" org-babel-comint-buffer-livep current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 matlab-shell run-octave rename-buffer bufferp buffer-name] 11 (#$ . 4581)])
#@269 Pass BODY to the octave process in SESSION.
If RESULT-TYPE equals `output' then return the outputs of the
statements in BODY, if RESULT-TYPE equals `value' then return the
value of the last statement in BODY, as elisp.

(fn SESSION BODY RESULT-TYPE &optional MATLABP)
(defalias 'org-babel-octave-evaluate #[1027 "\203\300$\207\301#\207" [org-babel-octave-evaluate-session org-babel-octave-evaluate-external-process] 9 (#$ . 5451)])
#@77 Evaluate BODY in an external octave process.

(fn BODY RESULT-TYPE MATLABP)
(defalias 'org-babel-octave-evaluate-external-process #[771 "\211\203\202		\303\267\2024\304\"\2025\305\306!\304\307\n\310\311\"\310\311\"$\"\210\312!\262\2025\313\207" [org-babel-matlab-shell-command org-babel-octave-shell-command org-babel-octave-wrapper-method #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (output 15 value 22)) org-babel-eval org-babel-temp-file "octave-" format org-babel-process-file-name noquote org-babel-octave-import-elisp-from-file nil] 14 (#$ . 5899)])
#@76 Evaluate BODY in SESSION.

(fn SESSION BODY RESULT-TYPE &optional MATLABP)
(defalias 'org-babel-octave-evaluate-session #[1027 "\306\203	\307\202\n\310!\306\311!\312\267\202S\313\314D\315#\202T\203;	\203;\316\n\317\320\"\317\320\"%\315P\202T\313\314\316\317\320\"\317\320\"$D\315#\202T\321\203\254	\203\254\322 \323\324\325\326\327!\330\"\331$\216\332\333!r\211q\210\323\324\334\326\327!\335\"\331$\216c\210\336\337\340\321\211\211\341&\210\342ed\"\210\343\344!\210\345!\203\242\346\347!\210\202\225*\337\262)\262\202`\350!\204\271\351\352\"\210\353 \323\324\354\326\327!\355\"\356$\216rq\210\212\357\337C\323\360\361\326\327!\362\"\363\364%
B\321\365\366p!!b\210`d{\262|\266c\210\367\321\370\"\210@b\210\212\371\372\203\f\202A!\321\370#\205\371B\321\370#)\204(\373\366p!!\210\202\374\365\366p!!b\210\211c\210\203R\374\375\315\376\372\206A\337!#\242\"\203R\377\242\324\225\"\240\210\201C\242B\")\266\202,\262\321\201D\267\202\273\201E!\202\274\203\223\201F\201G\337\201H\201I\201H\201J\"\"\"!A\202\253A\201F\201H\201I\201H\201J\"\"!\235A\262\313\201K\201F!\315#\202\274\321\207" [org-babel-octave-eoe-indicator org-babel-matlab-with-emacs-link org-babel-matlab-emacs-link-wrapper-method org-babel-octave-wrapper-method comint-input-filter comint-output-filter-functions org-babel-temp-file "matlab-" "octave-" "matlab-emacs-link-wait-signal-" #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (output 20 value 31)) mapconcat org-babel-chomp "\n" format org-babel-process-file-name noquote nil current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 generate-new-buffer " *temp*" "\301\300!\205	\302\300!\207" [buffer-name kill-buffer] write-region "" ignored excl matlab-shell-run-region message "Waiting for Matlab Emacs Link" file-exists-p sit-for 0.01 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 comint-send-input t re-search-forward regexp-quote accept-process-output string-match replace-regexp-in-string "[
\n]+" substring comint-last-input-end org-babel-octave-eoe-output comint-prompt-regexp split-string #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (value 362 output 370)) org-babel-octave-import-elisp-from-file reverse delq mapcar org-strip-quotes org-trim identity] 17 (#$ . 6521)])
#@141 Import data from FILE-NAME.
This removes initial blank and comment lines and then calls
`org-babel-import-elisp-from-file'.

(fn FILE-NAME)
(defalias 'org-babel-octave-import-elisp-from-file #[257 "\300\301!\302\211\303\304!\305\306\307\310\311!\312\"\313$\216r\211q\210\314!\210\315\316\302\317#\210e\211\262\320 \211\262W\2035|\210)r\211q\210\321\302\211\302\306%\210*\266\322\323\"\207" [org-babel-temp-file "octave-matlab-" nil generate-new-buffer " *temp file*" make-byte-code 0 "\301\300!\205	\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-file-contents re-search-forward "^[ 	]*[^# 	]" t point-at-bol write-region org-babel-import-elisp-from-file (16)] 12 (#$ . 9190)])
(provide 'ob-octave)

Zerion Mini Shell 1.0