when and when not to use define-module

Derek Atkins warlord at MIT.EDU
Fri Nov 2 11:35:56 EDT 2012


Hi,

"mcmurchy1917-gnucash at yahoo.co.uk" <mcmurchy1917-gnucash at yahoo.co.uk>
writes:

> Why is it that that a custom report needs this definition 
>
> (define-module (gnucash report a-module)) 
>
> when installed as a 'proper' report in /usr/share/gnucash/guile-modules/gnucash/report
>
> but needs to be commented out when installed in the users .gnucash directory

It's due to the method that the code is loaded.  GnuCash loads the files
in the 'reports' section as modules so it expects to be declared as
one.  Whereas when you "load-file" directly it is not expecting a module
and bombs out if you find one.

> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

-derek

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


More information about the gnucash-user mailing list