From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [babel] session initialization (was RE: python/babel inline images) Date: Thu, 07 Jun 2012 20:18:09 -0600 Message-ID: <87fwa6mtr2.fsf@gmx.com> References: <87pq9egifm.fsf@bye.fritz.box> <874nqp9580.fsf@gmx.com> <007401cd437f$ab542b20$01fc8160$@us> <878vg0bbwm.fsf@gmx.com> <000001cd440b$8d20abb0$a7620310$@us> <87ehpsqn5v.fsf@gmx.com> <002601cd441c$685c60b0$39152210$@us> <004301cd4438$f5e90980$e1bb1c80$@us> <001801cd44fd$7323e7c0$596bb740$@us> <87txymn3fb.fsf@gmx.com> <001b01cd4501$abe99bf0$03bcd3d0$@us> <001e01cd4519$e1c07d80$a5417880$@us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Scomd-0004Gv-3y for emacs-orgmode@gnu.org; Thu, 07 Jun 2012 22:18:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Scomb-0004Bb-0T for emacs-orgmode@gnu.org; Thu, 07 Jun 2012 22:18:38 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:55851 helo=mailout-us.mail.com) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Scoma-0004BW-QN for emacs-orgmode@gnu.org; Thu, 07 Jun 2012 22:18:36 -0400 In-Reply-To: <001e01cd4519$e1c07d80$a5417880$@us> (Mikhail Titov's message of "Thu, 7 Jun 2012 20:56:11 -0500") 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: Mikhail Titov Cc: emacs-orgmode@gnu.org "Mikhail Titov" writes: [...] >> > I would recommend using the `default-directory' variable. That should >> > hold the value of the directory of the Org-mode file or the value of the >> > :dir header argument if present. >> >> Huh... now it works... I remember I've tried before but for some reason it >> was nil.. maybe typo though I have AC. >> >> The only trick [1] is to use (file-truename default-directory) as Matlab >> does not like ~. > > Turns out this does not work for octave for some reason. default-directory > points to my home folder. > > Also I'm getting "ansi-color-process-output: Marker does not point anywhere" > for Octave. So I have to C-c a couple of times on the block for the first > time. First evaluation just launches session but breaks because of that > error. Second time (when session is up) C-c works just fine and dumps > result. Non-session version of Octave works as expected. I wonder if it is > something Windows-specific... I can see test on :session for Octave and > Achim Gratz said it passed tests. > > The problem occurs to me with git version of ob-octave.el as well. So I'm > confident it is not me who broke something during experiments :-) > > Any idea? Matlab works just fine (session)! > > I'm afraid I'll leave all the things as is for now. Maybe someone else can > fix it later. > Unfortunately the developer of matlab/octave support for Babel no longer tracks this list, and I have no access to matlab/octave, so while I'm happy to offer advice and commit patches I can't really improve support for these languages. RE: default-directory pointing to your home directory, my guess would be that at the beginning of the `org-babel-execute:octave' default-directory has the desired value, but then within the octave comint buffer the value changes, so it should still be possible to use `default-directory'. The ansi-color-process-output stuff sounds like something that octave-mode should be taking care of, i.e., not something directly related to Org-mode. Sorry I can't be of more assistance. -- Eric Schulte http://cs.unm.edu/~eschulte