emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [babel] session initialization (was RE: python/babel inline imag


From: Mikhail Titov
Subject: Re: [O] [babel] session initialization (was RE: python/babel inline images)
Date: Thu, 7 Jun 2012 20:56:11 -0500

> -----Original Message-----
> From: address@hidden [mailto:emacs-orgmode-
> address@hidden On Behalf Of Mikhail Titov
> Sent: Thursday, June 07, 2012 6:03 PM
> To: 'Eric Schulte'
> Cc: address@hidden
> Subject: Re: [O] [babel] session initialization (was RE: python/babel
inline
> images)
> 
> > >> ...
> > >>
> > >> How would I reliably refer to the org doc buffer from where
everything
> was
> > >> called? The following works just fine in session initialization code
> for
> > >> Matlab but not for Octave
> > >>
> > >
> > > (file-name-directory
> > >    (car (delq nil (mapcar #'buffer-file-name (buffer-list)))))
> > >
> > > It works. But I have a feeling that it is not a reliable method. Any
> > > suggestions?
> > >
> >
> > 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.

M.
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]