summaryrefslogtreecommitdiff
path: root/lisp/ob-octave.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/ob-octave.el')
-rw-r--r--lisp/ob-octave.el12
1 files changed, 4 insertions, 8 deletions
diff --git a/lisp/ob-octave.el b/lisp/ob-octave.el
index 8cc66b6..14b55d2 100644
--- a/lisp/ob-octave.el
+++ b/lisp/ob-octave.el
@@ -82,18 +82,19 @@ end")
(full-body
(org-babel-expand-body:generic
body params (org-babel-variable-assignments:octave params)))
+ (gfx-file (ignore-errors (org-babel-graphical-output-file params)))
(result (org-babel-octave-evaluate
session
- (if (org-babel-octave-graphical-output-file params)
+ (if gfx-file
(mapconcat 'identity
(list
"set (0, \"defaultfigurevisible\", \"off\");"
full-body
- (format "print -dpng %s" (org-babel-octave-graphical-output-file params)))
+ (format "print -dpng %s" gfx-file))
"\n")
full-body)
result-type matlabp)))
- (if (org-babel-octave-graphical-output-file params)
+ (if gfx-file
nil
(org-babel-reassemble-table
result
@@ -268,11 +269,6 @@ This removes initial blank and comment lines and then calls
(match-string 1 string)
string))
-(defun org-babel-octave-graphical-output-file (params)
- "Name of file to which maxima should send graphical output."
- (and (member "graphics" (cdr (assq :result-params params)))
- (cdr (assq :file params))))
-
(provide 'ob-octave)