[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] babel scheme not working
From: |
Nick Dokos |
Subject: |
Re: [O] babel scheme not working |
Date: |
Thu, 28 May 2015 15:56:53 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Lawrence Bottorff <address@hidden> writes:
> Yes, thanks, the :session did the trick. Is that documented somewhere?
> Also, it ignored my running MIT Scheme and fired up a Guile REPL in
> the next buffer. I guess it's doing something with Geiser, hence,
> Guile?
>
(info "(org) session"):
,----
| The ‘:session’ header argument starts a (possibly named) session for an
| interpreted language where the interpreter’s state is preserved. All
| code blocks sharing the same name are exectuted by the same interpreter
| process. By default, a session is not started.
`----
The interpreter that geiser runs is specified in
geiser-default-implementation.
> On Thu, May 28, 2015 at 3:20 PM, Nick Dokos <address@hidden> wrote:
>
> Lawrence Bottorff <address@hidden> writes:
>
> > The MIT scheme repl is running in the next buffer. . .
> >
>
> Did you try it?
>
> --8<---------------cut here---------------start------------->8---
> #+BEGIN_SRC scheme :session foo
> (define (mydouble x)
> (+ x x))
> #+END_SRC
>
> #+RESULTS:
>
> doesn't seem to remember from one block to the next. So, after defining
> the code above
>
> #+BEGIN_SRC scheme :session foo
> (mydouble 5)
> #+END_SRC
>
> #+RESULTS:
> : 10
> --8<---------------cut here---------------end--------------->8---
>
> Without the session, I get
>
> #+RESULTS
> : An error occurred.
>
> instead. This is with guile as the scheme interpreter, but that should
> not make any difference.
>
> > On May 28, 2015 2:16 PM, "Nick Dokos" <address@hidden> wrote:
> >
> > Lawrence Bottorff <address@hidden> writes:
> >
> > > . . . installed geiser via elpa -- and got some functionality.
> Although a simple thing like
> > >
> > > #+BEGIN_SRC scheme
> > > (define (mydouble x)
> > > (+ x x))
> > > #+END_SRC
> > >
> > > doesn't seem to remember from one block to the next. So, after
> defining the code above
> > >
> > > #+BEGIN_SRC scheme
> > > (mydouble 5)
> > > #+END_SRC
> > >
> > > gives an error, while
> > >
> > > #+BEGIN_SRC scheme
> > > (define (mysquare x)
> > > (* x x))
> > > (mysquare 5)
> > > #+END_SRC
> > >
> > > #+RESULTS:
> > > : 25
> > >
> > > works. Any way to have it remember like a REPL does?
> >
> > Use a session?
>
Nick