MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 18.117.158.174
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/share/emacs/24.3/lisp/org/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/share/emacs/24.3/lisp/org/ob-octave.elc
;ELC
;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:43 2024
;;; from file /builddir/build/BUILD/emacs-24.3/lisp/org/ob-octave.el
;;; in Emacs version 24.3.1
;;; 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!\210\300\303!\210\300\304!\207" [require ob ob-ref ob-comint ob-eval] 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" (#$ . 763))
#@53 Shell command to run octave as an external process.
(defvar org-babel-octave-shell-command "octave -q" (#$ . 891))
#@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 (#$ . 1013))
(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")
#@44 Execute a block of matlab code with Babel.
(defalias 'org-babel-execute:matlab #[(body params) "\302	\303#\207" [body params org-babel-execute:octave matlab] 4 (#$ . 1698)])
#@44 Execute a block of octave code with Babel.
(defalias 'org-babel-execute:octave #[(body params &optional matlabp) "\306\307\310\203\311\202\f\312\"!\313\314	\"A	\"\315\316\317	\320\"\"\313\321	\"A\313\322	\"A\313\323	\"A#\324$	\325	!#%\326\n\327	!\203T\330\331\332%\307\333\327	!\"E\334#\202V%
$&\327	!?\205~\335&\336\313\337	\"A\313\340	\"A\"\336\313\341	\"A\313\342	\"A\"#.\207" [matlabp params session vars result-params result-type intern format "org-babel-%s-initiate-session" "matlab" "octave" assoc :session mapcar cdr org-babel-get-header :var :result-params :result-type :file org-babel-expand-body:generic org-babel-variable-assignments:octave org-babel-octave-evaluate org-babel-octave-graphical-output-file mapconcat identity "set (0, \"defaultfigurevisible\", \"off\");" "print -dpng %s" "\n" org-babel-reassemble-table org-babel-pick-name :colname-names :colnames :rowname-names :rownames out-file body full-body result] 10 (#$ . 1879)])
#@38 Prepare SESSION according to PARAMS.
(defalias 'org-babel-prep-session:matlab #[(session params) "\302	\303#\207" [session params org-babel-prep-session:octave matlab] 4 (#$ . 2856)])
#@67 Return list of octave statements assigning the block's variables.
(defalias 'org-babel-variable-assignments:octave #[(params) "\301\302\301\303\304\305\"\"\"\207" [params mapcar #[(pair) "\301\302@\303A!#\207" [pair format "%s=%s;" org-babel-octave-var-to-octave] 5] cdr org-babel-get-header :var] 7 (#$ . 3047)])
(defalias 'org-babel-variable-assignments:matlab 'org-babel-variable-assignments:octave)
#@156 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.
(defalias 'org-babel-octave-var-to-octave #[(var) "<\203\301\302\303\211@<\203\304\202\305#\306Q\207;\203\"\307\310\"\207\307\311\"\207" [var "[" mapconcat org-babel-octave-var-to-octave "; " "," "]" format "'%s'" "%s"] 5 (#$ . 3460)])
#@72 Prepare SESSION according to the header arguments specified in PARAMS.
(defalias 'org-babel-prep-session:octave #[(session params &optional matlabp) "\305	\n#\306	!\212\307 \310\216\311!\204\312\313\"\210q\210\314\315\"\210+*\207" [session params matlabp var-lines save-match-data-internal org-babel-octave-initiate-session org-babel-variable-assignments:octave match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" mapc #[(var) "\302\210c\210\303\304\305\"\210\306	!\207" [var session 1 comint-send-input nil t org-babel-comint-wait-for-output] 3]] 4 (#$ . 3869)])
#@149 Create a matlab inferior process buffer.
If there is not a current inferior-process-buffer in SESSION then
create.  Return the initialized session.
(defalias 'org-babel-matlab-initiate-session #[(&optional session params) "\302	\303#\207" [session params org-babel-octave-initiate-session matlab] 4 (#$ . 4579)])
#@150 Create an octave inferior process buffer.
If there is not a current inferior-process-buffer in SESSION then
create.  Return the initialized session.
(defalias 'org-babel-octave-initiate-session #[(&optional session params matlabp) "\203\304\305!\210\202\304\306!\210	\307\230?\205a	\206#\203\"\310\202#\311\312	!\203.	\202`\313 \314\216\203A\204D\315 \210\202D\316 \210\317\320	!\203Q\321	!\202\\	;\203Z	\202\\\321 !\210p*)\207" [matlabp session #1=#:wconfig org-babel-matlab-with-emacs-link require matlab octave-inf "none" "*Inferior Matlab*" "*Inferior Octave*" org-babel-comint-buffer-livep current-window-configuration ((set-window-configuration #1#)) matlab-shell run-octave rename-buffer bufferp buffer-name] 3 (#$ . 4900)])
#@218 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.
(defalias 'org-babel-octave-evaluate #[(session body result-type &optional matlabp) "\203\304	\n$\207\305	\n#\207" [session body result-type matlabp org-babel-octave-evaluate-session org-babel-octave-evaluate-external-process] 5 (#$ . 5662)])
#@46 Evaluate BODY in an external octave process.
(defalias 'org-babel-octave-evaluate-external-process #[(body result-type matlabp) "\203	\202	\n\306\f\307\"\203\310
\"\202<\306\f\311\"\205<\312\313!\310\314
\315\316\"\315\316\"$\"\210\317!))\207" [matlabp org-babel-matlab-shell-command org-babel-octave-shell-command cmd result-type body eql output org-babel-eval value org-babel-temp-file "octave-" format org-babel-process-file-name noquote org-babel-octave-import-elisp-from-file tmp-file org-babel-octave-wrapper-method] 9 (#$ . 6134)])
#@27 Evaluate BODY in SESSION.
(defalias 'org-babel-octave-evaluate-session #[(session body result-type &optional matlabp) "\306\203	\307\202\n\310!\306\311!\312\313\"\203!\314\315\f
D\316#\202W\312\317\"\205W\203D=\203D\320>\f\321	\322\"\321	\322\"\n%\316P\202W\314\315\320?\f\321	\322\"\321	\322\"$
D\316#@\203\236=\203\236\323 A\324\216\325\326!BrBq\210\327\216@c\210\330\331\332\n\333\211\211\334&\210\335ed\"\210\336\337!\210\340\n!\203\231\341\342!\210\202\214-\331\202I\212\343 C\344\216\345D!\204\262\346\347D\"\210Dq\210\331\333\211EFG\350HBH\351\216\352\353p!!b\210`dI\211JI{FJI|\210*@c\210\354\333\355\"\210Kb\210\212\356\357\203\371
\202\373L!\333\355#\205\356M\333\355#)\204\360\353p!!\210\202\352\352\353p!!b\210Fc\210)@\203A\361\362\316\363\357@\2061\331!#G\"\203AG\364\225\333OE\365GM\".E\333N\312\317\"\203[\366	!\202\217\312\313\"\205\217\203w\367\370\331\371\372\371\373E\"\"\"!A\202\205L\367\371\372\371\373E\"\"!\235AN\314\374\367N!\316#-\207" [matlabp tmp-file wait-file result-type body org-babel-octave-eoe-indicator org-babel-temp-file "matlab-" "octave-" "matlab-emacs-link-wait-signal-" eql output mapconcat org-babel-chomp "\n" value format org-babel-process-file-name noquote current-window-configuration ((set-window-configuration #1=#:wconfig)) generate-new-buffer " *temp*" ((byte-code "\301!\203\n\302!\210\301\207" [#2=#:temp-buffer buffer-name kill-buffer] 2)) write-region "" ignored nil excl matlab-shell-run-region message "Waiting for Matlab Emacs Link" file-exists-p sit-for 0.01 match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" #[(text) "	P\211\207" [string-buffer text] 2] ((byte-code "A\301\207" [comint-output-filter-functions nil] 1)) process-mark get-buffer-process comint-send-input t re-search-forward regexp-quote accept-process-output string-match replace-regexp-in-string "[
\n]+" 0 split-string org-babel-octave-import-elisp-from-file reverse delq mapcar org-babel-octave-read-string org-babel-trim identity org-babel-matlab-with-emacs-link org-babel-matlab-emacs-link-wrapper-method org-babel-octave-wrapper-method full-body #1# #2# save-match-data-internal session raw dangling-text string-buffer comint-output-filter-functions end start comint-last-input-end org-babel-octave-eoe-output comint-prompt-regexp results] 10 (#$ . 6700)])
#@125 Import data from FILE-NAME.
This removes initial blank and comment lines and then calls
`org-babel-import-elisp-from-file'.
(defalias 'org-babel-octave-import-elisp-from-file #[(file-name) "\306\307!\310\211\211\311\312\313!!\314\216rq\210\315
!\210\316\317\310\320#\210e\211\321 \211W\203/	|\210)rq\210\322\310\211\f\310\323%\210,\324\n\325\"+\207" [end beg temp-file #1=#:temp-buffer #2=#:temp-file file-name org-babel-temp-file "octave-matlab-" nil get-buffer-create generate-new-buffer-name " *temp file*" ((byte-code "\301!\203\n\302!\210\301\207" [#1# buffer-name kill-buffer] 2)) insert-file-contents re-search-forward "^[ 	]*[^# 	]" t point-at-bol write-region 0 org-babel-import-elisp-from-file (16)] 7 (#$ . 9212)])
#@38 Strip \"s from around octave string.
(defalias 'org-babel-octave-read-string #[(string) "\301\302\"\203\f\303\304\"\207\207" [string string-match "^\"\\([^]+\\)\"$" match-string 1] 3 (#$ . 9958)])
#@60 Name of file to which maxima should send graphical output.
(defalias 'org-babel-octave-graphical-output-file #[(params) "\301\302\236A\235\205
\303\236A\207" [params "graphics" :result-params :file] 3 (#$ . 10166)])
(provide 'ob-octave)

MMCT - 2023