From 2d1025298e31889655dc2507b52d53aa8be87a7a Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Mon, 3 May 2010 21:43:42 -0400 Subject: [PATCH] babel: More concise matlab/octave code template Patch by Christopher Long --- contrib/babel/lisp/langs/org-babel-octave.el | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/contrib/babel/lisp/langs/org-babel-octave.el b/contrib/babel/lisp/langs/org-babel-octave.el index 3267a56dc..41a5be65c 100644 --- a/contrib/babel/lisp/langs/org-babel-octave.el +++ b/contrib/babel/lisp/langs/org-babel-octave.el @@ -111,13 +111,8 @@ then create. Return the initialized session." (defvar org-babel-octave-wrapper-method "%s -if ischar(ans) - fid = fopen('%s', 'w') - fprintf(fid, '%%s', ans) - fprintf(fid, '\\n') - fclose(fid) -else - save -ascii %s ans +if ischar(ans), fid = fopen('%s', 'w'); fprintf(fid, '%%s\\n', ans); fclose(fid); +else, save -ascii %s ans end") (defvar org-babel-octave-eoe-indicator "\'org_babel_eoe\'")