From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mikhail Titov" Subject: Re: [babel] ob-octave does not catch EOE from matlabShell on MS Windows Date: Fri, 25 May 2012 11:31:11 -0500 Message-ID: <010501cd3a93$ccb65f80$66231e80$@us> References: <00f901cd39f0$7da5bb00$78f13100$@us> <00ff01cd39f4$7feec3d0$7fcc4b70$@us> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXxQ1-0004VB-IC for emacs-orgmode@gnu.org; Fri, 25 May 2012 12:31:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXxPz-0005Wz-R6 for emacs-orgmode@gnu.org; Fri, 25 May 2012 12:31:13 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:53917 helo=mailout-us.mail.com) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SXxPz-0005Wi-Kc for emacs-orgmode@gnu.org; Fri, 25 May 2012 12:31:11 -0400 In-Reply-To: <00ff01cd39f4$7feec3d0$7fcc4b70$@us> Content-Language: en-us List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org > -----Original Message----- > From: emacs-orgmode-bounces+mlt=3Dgmx.us@gnu.org = [mailto:emacs-orgmode- > bounces+mlt=3Dgmx.us@gnu.org] On Behalf Of Mikhail Titov > Sent: Thursday, May 24, 2012 4:31 PM > To: emacs-orgmode@gnu.org > Subject: Re: [O] [babel] ob-octave does not catch EOE from matlabShell = on MS > Windows >=20 > > ... > > > > I have a simple test block like > > > > #+begin_src matlab :session *MATLAB* > > a=3D2 > > #+end_src > > > > When I try to execute it with C-c C-c , emacs never returns unless I = hit C- > g. > > If I do M-x toggle-debug-on-quit RET I see that for some reason it = keeps > > waiting for EOE. It looks like org-babel-octave-eoe-output and = org-babel-octave-eoe-indicator were swapped around in = org-babel-octave-evaluate-session . I have the following in dot emacs (setq org-babel-octave-eoe-output " ans =3D org_babel_eoe ") M. > > > > ... > > > > Here is what I see in *MATLAB* buffer: > > > > ----8<-----------------*MATLAB*------------------>8----- > > >> a=3D2 > > if ischar(ans), fid =3D fopen('c:/DOCUME~1/user/LOCALS~1/Temp/babel- > > 7560HUp/matlab-7560PPd', 'w'); fprintf(fid, '%s\n', ans); = fclose(fid); else, > > = dlmwrite('c:/DOCUME~1/user/LOCALS~1/Temp/babel-7560HUp/matlab-7560PPd', = ans, > > '\t'); end > > 'org_babel_eoe' > > > > a =3D > > > > 2 > > > > >> >> > > ans =3D > > > > org_babel_eoe > > > > >> > > ----8<-----------------*MATLAB*------------------>8----- >=20 > I feel like it is about >=20 > (defvar org-babel-octave-eoe-output "ans =3D org_babel_eoe") >=20 > as Matlab's return has newlines. I'm not sure so far how to make = universal > regex for re-search-forward in org-babel-comint-with-output . >=20 > Mikhail >=20 >=20 >=20