GnuCash reports via eguile - probably not

Derek Atkins warlord at MIT.EDU
Wed Jan 21 12:47:04 EST 2009

Chris Dennis <cgdennis at> writes:

> I've boiled the problem down to this:
> ----
> ;#! /usr/bin/guile
> (define fred "This is Fred")
> (define (foo bar)
>    (display fred) (newline) (display bar) (newline)
>    (display "and now via eval-string...") (newline)
>    (let ((string1 "(display fred) (newline) (display bar) (newline)"))
>      (eval-string string1)))
> (foo "Actual parameter")
> ----
> gives this output:
> ----
> This is Fred
> Actual parameter
> and now via eval-string...
> This is Fred
> ERROR: Unbound variable: bar
> ----
> So the global variable 'fred' does exist in the eval-string environment, 
> but the parameter 'bar' doesn't (or rather its value isn't available).
> Can any Guile/Scheme experts help?


That is an interesting conundrum.  Unfortunately my guile/scheme
foo isn't strong enough..

I would think you could use something like "local-eval" to do it,
but I don't know how to get the string into a form where you could
perform the local evaluation.


       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL:    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the gnucash-devel mailing list