emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten <quintfall@googlemail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [babel] adding a language - problems
Date: Thu, 29 Sep 2011 00:56:28 +0200	[thread overview]
Message-ID: <86k48s6ztv.fsf@googlemail.com> (raw)
In-Reply-To: 86oby471k3.fsf@googlemail.com

Thorsten <quintfall@googlemail.com> writes:

> Hi list, 
> I'm on my way to add a new (intrpreted) lisp dialect to org-babel, but
> encounter a few difficulties. Here is my little testprogramm:
>
> ---------------------
> #+tblname: tbl1
> | 1 | 2 | 3 |
> |---+---+---|
> | 4 | 5 | 6 |
> | 7 | 8 | 9 |
>
>
> # external evaluation (no session)
> #+srcname: pico-calc
> #+begin_src picolisp :var tab=tbl1 :results value :hlines no 
>   (+ (caar tab) (caar (cdr tab)))
> #+end_src
>
> # org-babel-error output:
> [/tmp/babel-22634XBd/picolisp-script-22634K-K:1] !? (display (prog (let
> (tab '((1 2 3) (4 5 6) (7 8 9))) (+ (caar tab) (caar (cdr tab))))))
> display -- Undefined
>
>
> #  with session
> #+srcname: pico-calc
> #+begin_src picolisp :var tab=tbl1 :results value :hlines no :session "p1"
>   (+ (caar tab) (caar (cdr tab)))
> #+end_src
>
> #+results: pico-calc
> [finishes with no output]
>
> # session buffer:
> (prog (let (tab '((1 2 3) (4 5 6) (7 8 9))) 
> (+ (caar tab) (caar (cdr tab)))) )
> "org-babel-picolisp-eoe"
> -> 5
> : -> "org-babel-picolisp-eoe"
>
> ---------------
>
> I do not know where undefined 'display' comes from in the error message
> - seems to be a org-babel internal thing. What can I do about that,
> where do I have to look?
>
> The session evaluation works already, but there is a problem with the
> eoe string. If I don't use it, Emacs hangs forever - waiting for the
> session to return? If I use it, the right value is calculated, but not
> returned - because the eoe string is evaluated after the source-body?
>
> Thanks for any tips
> Thorsten


Sorry, I encountered the undefined 'display' in source code I copied
from ob-scheme, I deleted it, and then external evaluation succeeded -
but again without output. 
So I seem to be quite close, evaluation work and the right value is
calculated - but not returned yet. 

cheers
Thorsten 

  reply	other threads:[~2011-09-28 22:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-28 22:19 [babel] adding a language - problems Thorsten
2011-09-28 22:56 ` Thorsten [this message]
2011-09-29 12:48   ` Eric Schulte
2011-09-29 18:27     ` Thorsten

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=86k48s6ztv.fsf@googlemail.com \
    --to=quintfall@googlemail.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).