emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* babel scheme not working
@ 2015-05-28 17:29 Lawrence Bottorff
  2015-05-28 17:49 ` Lawrence Bottorff
  0 siblings, 1 reply; 7+ messages in thread
From: Lawrence Bottorff @ 2015-05-28 17:29 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 257 bytes --]

 #+BEGIN_SRC scheme
(define (mydouble x)
(+ x x))

  #+END_SRC

produces

org-babel-execute-src-block: Symbol's value as variable is void:
geiser-default-implementation

also, no indentation or color coding of any sort (maybe this isn't a
feature yet?)

LB

[-- Attachment #2: Type: text/html, Size: 470 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: babel scheme not working
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Lawrence Bottorff @ 2015-05-28 17:49 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

. . . 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?

[-- Attachment #2: Type: text/html, Size: 918 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: babel scheme not working
  2015-05-28 17:49 ` Lawrence Bottorff
@ 2015-05-28 18:15   ` Nick Dokos
  2015-05-28 18:37     ` Lawrence Bottorff
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2015-05-28 18:15 UTC (permalink / raw)
  To: emacs-orgmode

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?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: babel scheme not working
  2015-05-28 18:15   ` Nick Dokos
@ 2015-05-28 18:37     ` Lawrence Bottorff
  2015-05-28 19:20       ` Nick Dokos
  0 siblings, 1 reply; 7+ messages in thread
From: Lawrence Bottorff @ 2015-05-28 18:37 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

The MIT scheme repl is running in the next buffer. . .
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?
>
>
>

[-- Attachment #2: Type: text/html, Size: 1223 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: babel scheme not working
  2015-05-28 18:37     ` Lawrence Bottorff
@ 2015-05-28 19:20       ` Nick Dokos
  2015-05-28 19:40         ` Lawrence Bottorff
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2015-05-28 19:20 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: babel scheme not working
  2015-05-28 19:20       ` Nick Dokos
@ 2015-05-28 19:40         ` Lawrence Bottorff
  2015-05-28 19:56           ` Nick Dokos
  0 siblings, 1 reply; 7+ messages in thread
From: Lawrence Bottorff @ 2015-05-28 19:40 UTC (permalink / raw)
  Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1885 bytes --]

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 <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
>
>
>

[-- Attachment #2: Type: text/html, Size: 3001 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: babel scheme not working
  2015-05-28 19:40         ` Lawrence Bottorff
@ 2015-05-28 19:56           ` Nick Dokos
  0 siblings, 0 replies; 7+ messages in thread
From: Nick Dokos @ 2015-05-28 19:56 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-05-28 19:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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).