emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Using org-babel with Scheme
@ 2012-02-09  7:53 Leo Alekseyev
  2012-02-15 14:33 ` Eric Schulte
  0 siblings, 1 reply; 4+ messages in thread
From: Leo Alekseyev @ 2012-02-09  7:53 UTC (permalink / raw)
  To: Emacs orgmode

Is anyone on the list using a recent org-babel with Scheme?  I
recently started working through SICP, and I'm running into issues
evaluating scheme src  blocks.  Org-babel error buffer pops up with
"ERROR: Wrong number of arguments to #<primitive-generic display>",
and the minibuffer prompts me for a lisp expression.  Is there
anything I need to configure beyond   (org-babel-do-load-languages
'org-babel-load-languages  '((scheme . t)))?

(Running latest org from git in Emacs 24; have Chicken scheme and
guile installed).

--Leo

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

* Re: Using org-babel with Scheme
  2012-02-09  7:53 Using org-babel with Scheme Leo Alekseyev
@ 2012-02-15 14:33 ` Eric Schulte
  2012-02-23  1:40   ` Kyle Andrews
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Schulte @ 2012-02-15 14:33 UTC (permalink / raw)
  To: Leo Alekseyev; +Cc: Emacs orgmode

Leo Alekseyev <dnquark@gmail.com> writes:

> Is anyone on the list using a recent org-babel with Scheme?  I
> recently started working through SICP, and I'm running into issues
> evaluating scheme src  blocks.  Org-babel error buffer pops up with
> "ERROR: Wrong number of arguments to #<primitive-generic display>",
> and the minibuffer prompts me for a lisp expression.  Is there
> anything I need to configure beyond   (org-babel-do-load-languages
> 'org-babel-load-languages  '((scheme . t)))?
>
> (Running latest org from git in Emacs 24; have Chicken scheme and
> guile installed).
>

I loaded the ob-scheme.el directly (which should be the same as loading
it with org-babel-do-load-languages as above) and the following works
for me.

#+begin_src scheme
  (+ 1 1 1)
#+end_src

#+RESULTS:
: 3

I have guile installed and I have the `scheme-program-name' variable set
to "guile elsewhere in my .emacs init.  I imagine setting the above
variable should enable scheme evaluation.

Best,

while looking into this I did notice that when launching Geiser (a nice
slime-like scheme evaluator) I would sometimes crash my entire Emacs
process by pressing C-g when Geiser prompts for a scheme executable.  I
imagine this is unrelated to your problem, but was certainly surprising.

>
> --Leo
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

* Re: Using org-babel with Scheme
  2012-02-15 14:33 ` Eric Schulte
@ 2012-02-23  1:40   ` Kyle Andrews
  2012-02-25 16:41     ` Eric Schulte
  0 siblings, 1 reply; 4+ messages in thread
From: Kyle Andrews @ 2012-02-23  1:40 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Emacs orgmode

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

I am having both of these issues on Emacs 24.  Emacs crashes sometimes on
geiser and babel won't evaluate scheme code as Racket code despite setting
'scheme-program-name and 'org-babel-scheme-cmd to "racket". However, Guile
will work if both of those variables hold "guile".

Any new developments?

On Wed, Feb 15, 2012 at 9:33 AM, Eric Schulte <eric.schulte@gmx.com> wrote:

> Leo Alekseyev <dnquark@gmail.com> writes:
>
> > Is anyone on the list using a recent org-babel with Scheme?  I
> > recently started working through SICP, and I'm running into issues
> > evaluating scheme src  blocks.  Org-babel error buffer pops up with
> > "ERROR: Wrong number of arguments to #<primitive-generic display>",
> > and the minibuffer prompts me for a lisp expression.  Is there
> > anything I need to configure beyond   (org-babel-do-load-languages
> > 'org-babel-load-languages  '((scheme . t)))?
> >
> > (Running latest org from git in Emacs 24; have Chicken scheme and
> > guile installed).
> >
>
> I loaded the ob-scheme.el directly (which should be the same as loading
> it with org-babel-do-load-languages as above) and the following works
> for me.
>
> #+begin_src scheme
>  (+ 1 1 1)
> #+end_src
>
> #+RESULTS:
> : 3
>
> I have guile installed and I have the `scheme-program-name' variable set
> to "guile elsewhere in my .emacs init.  I imagine setting the above
> variable should enable scheme evaluation.
>
> Best,
>
> while looking into this I did notice that when launching Geiser (a nice
> slime-like scheme evaluator) I would sometimes crash my entire Emacs
> process by pressing C-g when Geiser prompts for a scheme executable.  I
> imagine this is unrelated to your problem, but was certainly surprising.
>
> >
> > --Leo
> >
>
> --
> Eric Schulte
> http://cs.unm.edu/~eschulte/
>
>

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

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

* Re: Using org-babel with Scheme
  2012-02-23  1:40   ` Kyle Andrews
@ 2012-02-25 16:41     ` Eric Schulte
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Schulte @ 2012-02-25 16:41 UTC (permalink / raw)
  To: Kyle Andrews; +Cc: Emacs orgmode

Kyle Andrews <kcandrew@mtu.edu> writes:

> I am having both of these issues on Emacs 24.  Emacs crashes sometimes on
> geiser and babel won't evaluate scheme code as Racket code despite setting
> 'scheme-program-name and 'org-babel-scheme-cmd to "racket". However, Guile
> will work if both of those variables hold "guile".
>
> Any new developments?
>

I haven't had time to look into this.  I imagine the first issue is a
problem with Geiser.  As for the second issue, note that the value of
the 'org-babel-scheme-cmd variable is only used when external execution
is requested (e.g., when session is set to "none"), otherwise session
evaluation is used (likely using Geiser if Geiser is installed).

Sorry I do not have more time to look into this at the moment.

I you feel like looking to the code, a good starting place would be to
run the command `edebug-eval-top-level-form' within the definition of
`org-babel-execute:scheme' in ob-scheme.el, then running a code block
and stepping through its evaluation.

Best,

>
> On Wed, Feb 15, 2012 at 9:33 AM, Eric Schulte <eric.schulte@gmx.com> wrote:
>
>> Leo Alekseyev <dnquark@gmail.com> writes:
>>
>> > Is anyone on the list using a recent org-babel with Scheme?  I
>> > recently started working through SICP, and I'm running into issues
>> > evaluating scheme src  blocks.  Org-babel error buffer pops up with
>> > "ERROR: Wrong number of arguments to #<primitive-generic display>",
>> > and the minibuffer prompts me for a lisp expression.  Is there
>> > anything I need to configure beyond   (org-babel-do-load-languages
>> > 'org-babel-load-languages  '((scheme . t)))?
>> >
>> > (Running latest org from git in Emacs 24; have Chicken scheme and
>> > guile installed).
>> >
>>
>> I loaded the ob-scheme.el directly (which should be the same as loading
>> it with org-babel-do-load-languages as above) and the following works
>> for me.
>>
>> #+begin_src scheme
>>  (+ 1 1 1)
>> #+end_src
>>
>> #+RESULTS:
>> : 3
>>
>> I have guile installed and I have the `scheme-program-name' variable set
>> to "guile elsewhere in my .emacs init.  I imagine setting the above
>> variable should enable scheme evaluation.
>>
>> Best,
>>
>> while looking into this I did notice that when launching Geiser (a nice
>> slime-like scheme evaluator) I would sometimes crash my entire Emacs
>> process by pressing C-g when Geiser prompts for a scheme executable.  I
>> imagine this is unrelated to your problem, but was certainly surprising.
>>
>> >
>> > --Leo
>> >
>>
>> --
>> Eric Schulte
>> http://cs.unm.edu/~eschulte/
>>
>>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

end of thread, other threads:[~2012-02-25 16:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09  7:53 Using org-babel with Scheme Leo Alekseyev
2012-02-15 14:33 ` Eric Schulte
2012-02-23  1:40   ` Kyle Andrews
2012-02-25 16:41     ` Eric Schulte

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