Eguile report templates -- another hurdle
Andrew Sackville-West
andrew at swclan.homelinux.org
Sun Feb 1 11:08:32 EST 2009
On Sun, Feb 01, 2009 at 12:23:14PM +0000, Chris Dennis wrote:
> 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.
>
> 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?
not a clue, but have you tried
(read-disable 'case-insensitive)
in your code somewhere to confirm that this is the problem?
A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20090201/1e09b7b6/attachment.bin
More information about the gnucash-devel
mailing list