summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Davison <davison@stats.ox.ac.uk>2010-08-03 23:54:24 -0400
committerDan Davison <davison@stats.ox.ac.uk>2010-08-03 23:54:24 -0400
commit9978dcf21f2107251bfe4716c85cd5e0dbb578db (patch)
tree8fa3ac44dcc90d55158fc4b96e5ffd9a60a4b295
parentf318bdb19bd259c7faa509ba5d99d9ea82153840 (diff)
downloadorg-mode-9978dcf21f2107251bfe4716c85cd5e0dbb578db.tar.gz
babel: octave/matlab: use dlmwrite to write delimited text
2010-08-03 Dan Davison <davison@stats.ox.ac.uk> * ob-octave.el (org-babel-octave-wrapper-method): use dlmwrite to write delimited text instead of save -ascii (org-babel-octave-import-elisp-from-file): specify that data written to file is tab-delimited
-rw-r--r--lisp/ob-octave.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/ob-octave.el b/lisp/ob-octave.el
index ad7184e..e0c2705 100644
--- a/lisp/ob-octave.el
+++ b/lisp/ob-octave.el
@@ -76,7 +76,7 @@ delete('%s')
(defvar org-babel-octave-wrapper-method
"%s
if ischar(ans), fid = fopen('%s', 'w'); fprintf(fid, '%%s\\n', ans); fclose(fid);
-else, save -ascii %s ans
+else, dlmwrite('%s', ans, '\\t')
end")
(defvar org-babel-octave-eoe-indicator "\'org_babel_eoe\'")
@@ -253,7 +253,7 @@ This removes initial blank and comment lines and then calls
(if (< (setq beg (point-min))
(setq end (point-at-bol)))
(delete-region beg end)))
- (org-babel-import-elisp-from-file temp-file)))
+ (org-babel-import-elisp-from-file temp-file '(16))))
(defun org-babel-octave-read-string (string)
"Strip \\\"s from around octave string"