emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: babel scheme not working
Date: Thu, 28 May 2015 15:56:53 -0400	[thread overview]
Message-ID: <87wpzsxypm.fsf@alphaville.usersys.redhat.com> (raw)
In-Reply-To: CAFAhFSW6QB1SKmbV0mfOz-9SjVqG_K60RbDtah9EMpQuVVjhJA@mail.gmail.com

Lawrence Bottorff <borgauf@gmail.com> 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 <ndokos@gmail.com> wrote:
>
>     Lawrence Bottorff <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
>      (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" <ndokos@gmail.com> wrote:
>     >
>     >     Lawrence Bottorff <borgauf@gmail.com> 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

      reply	other threads:[~2015-05-28 19:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 17:29 babel scheme not working Lawrence Bottorff
2015-05-28 17:49 ` Lawrence Bottorff
2015-05-28 18:15   ` Nick Dokos
2015-05-28 18:37     ` Lawrence Bottorff
2015-05-28 19:20       ` Nick Dokos
2015-05-28 19:40         ` Lawrence Bottorff
2015-05-28 19:56           ` Nick Dokos [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wpzsxypm.fsf@alphaville.usersys.redhat.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).