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
This commit is contained in:
Dan Davison 2010-08-03 23:54:24 -04:00
parent f318bdb19b
commit 9978dcf21f
1 changed files with 2 additions and 2 deletions

View File

@ -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"