Docs for the guile interface to gnucash?

Derek Atkins warlord at MIT.EDU
Sun May 16 23:15:44 EDT 2004


Jeremy Hankins <nowan at nowan.org> writes:

> The example I had in mind was calculating loan payments differently
> (e.g., compounded continuously).  From what I can see, this would be
> fairly straightforward: just write the appropriate functions in my
> config.user, and use them from the scheduled transaction editor.

I believe it is possible to add new functions via scheme (although I
don't know if the core engine will pick them up properly).  The "pmt"
function is definitely written in scheme, so writing a different
function that compounds interest differently shouldn't be too hard.

If you do add new functions we'd be extremely interested in them.  For
example, if you add a "current balance" function, we'd definitely want
that.  :)

The problem is that the register input (which is written in C) would
need to know how to store the function information -- and AFAIK we
don't have a language for that.  Perhaps this is somewhere that GO
could help?  If they have a "function plug-in" so that users could add
new functions, we could replicate that to allow the engine to learn
about the available functions and know how to ask the user to input
them.  But this is a LONG ways off (probably even post-2.0).

>> As Derek mentioned, this may not be as easy as you hope...  Currently,
>> non of the SX functionality is exposed to guile, and there's no
>> already-defined or clear-cut 'hook' locations.
>
> That's disappointing.  I was hoping for something like emacs or
> sawfish.  Oh well.

Heh.  Not even close.  The level of integration is, umm, poor.  It's
DEFINITELY not well-conceived.  Some things are relatively easy to do
via scheme, some things are impossible.  Worse, there are lots of
places where the code interdependent, were the C and scheme depend on
each other's implementations.  There are very few hooks in the code
(although the number is non-zero).

-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