From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Bottorff Subject: Re: babel scheme not working Date: Thu, 28 May 2015 15:40:25 -0400 Message-ID: References: <878uc8zhzj.fsf@alphaville.usersys.redhat.com> <874mmwzez8.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b6dc6eaf8ea280517298714 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy3fI-0006rW-Eb for emacs-orgmode@gnu.org; Thu, 28 May 2015 15:40:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy3fH-0007Mg-A9 for emacs-orgmode@gnu.org; Thu, 28 May 2015 15:40:28 -0400 Received: from mail-pd0-x22a.google.com ([2607:f8b0:400e:c02::22a]:36335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy3fG-0007MU-VM for emacs-orgmode@gnu.org; Thu, 28 May 2015 15:40:27 -0400 Received: by pdfh10 with SMTP id h10so48636992pdf.3 for ; Thu, 28 May 2015 12:40:26 -0700 (PDT) In-Reply-To: <874mmwzez8.fsf@alphaville.usersys.redhat.com> 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 Cc: emacs-orgmode@gnu.org --047d7b6dc6eaf8ea280517298714 Content-Type: text/plain; charset=UTF-8 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? On Thu, May 28, 2015 at 3:20 PM, Nick Dokos wrote: > Lawrence Bottorff 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" wrote: > > > > Lawrence Bottorff 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 > > > --047d7b6dc6eaf8ea280517298714 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yes, thanks, the :session did the trick. Is that documente= d somewhere? Also, it ignored my running MIT Scheme and fired up a Guile RE= PL in the next buffer. I guess it's doing something with Geiser, hence,= Guile?

On T= hu, May 28, 2015 at 3:20 PM, Nick Dokos <ndokos@gmail.com> wr= ote:
Lawrence Bottorff &= lt;borgauf@gmail.com> 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
=C2=A0(define (mydouble x)
=C2=A0(+ 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
=C2=A0(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" <ndokos@gmail.com> wrote:
>
>=C2=A0 =C2=A0 =C2=A0Lawrence Bottorff <borgauf@gmail.com> writes:
>
>=C2=A0 =C2=A0 =C2=A0> . . . installed geiser via elpa -- and got som= e functionality. Although a simple thing like=C2=A0
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> #+BEGIN_SRC scheme
>=C2=A0 =C2=A0 =C2=A0> (define (mydouble x)
>=C2=A0 =C2=A0 =C2=A0> (+ x x)) =C2=A0
>=C2=A0 =C2=A0 =C2=A0> =C2=A0 #+END_SRC
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> doesn't seem to remember from one block to= the next. So, after defining the code above
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> #+BEGIN_SRC scheme
>=C2=A0 =C2=A0 =C2=A0> (mydouble 5)
>=C2=A0 =C2=A0 =C2=A0> =C2=A0#+END_SRC
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> gives an error, while=C2=A0
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> =C2=A0#+BEGIN_SRC scheme
>=C2=A0 =C2=A0 =C2=A0> (define (mysquare x)
>=C2=A0 =C2=A0 =C2=A0> =C2=A0 (* x x))
>=C2=A0 =C2=A0 =C2=A0> (mysquare 5)
>=C2=A0 =C2=A0 =C2=A0> =C2=A0#+END_SRC
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> =C2=A0 #+RESULTS:
>=C2=A0 =C2=A0 =C2=A0> =C2=A0 : 25
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> works. Any way to have it remember like a REPL= does?
>
>=C2=A0 =C2=A0 =C2=A0Use a session?

Nick



--047d7b6dc6eaf8ea280517298714--