Eguile report templates -- another hurdle

Derek Atkins warlord at MIT.EDU
Sun Feb 1 11:17:07 EST 2009


Quoting Chris Dennis <cgdennis at>:

> Chris Dennis wrote:
>> Hello folks
>> My project bring HTML templates to GnuCash reports is making good progress.
>> But I've stumbled on another problem which requires expert knowledge of
>> GnuCash and/org Swig and/or Guile.
>> My evaluated report code can access some Gnucash procedures such as
>> gnc:make-html-text, but others such as gncInvoiceGetBook remain 'unbound'.
> In fact the error message refers to 'gncinvoicegetbook' as being
> unbound, i.e. with the name in lower case.  Is that relevant?  Guile is
> supposed to be case-sensitive unless you tell it not to be.

Yes, that's DEFINITELY relevant.  There is no symbol "gncinvoicegetbook"
so something is lower-casing the code.

> I can reproduce the problem with this bit of code:
> 8<--------------
> ;#!/usr/bin/guile
> (define s1 "(abcDEF \"23\")")
> (define (abcDEF x)
>   (display (string-append "This is abcDEF called with " x "\n")))
> (with-input-from-string s1 (lambda () (local-eval (read)
>                                                   (the-environment))))
> (read-enable 'case-insensitive)
> (with-input-from-string s1 (lambda () (local-eval (read)
>                                                   (the-environment))))
> 8<--------------
> After setting read to be case insensitive, local-eval tries to call
> (abcdef) and can't find it.
> I can't find anywhere in the GnuCash code that turns on case-insensitivity.
> Does anyone have any idea why this would happen?

I do not offhand..  But you could always try:

(read-enable 'case-sensitive)

to force it...


       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