Re: Guile 1.3 + G-wrap 0.9.8 patches

2000-11-02 Thread Dave Peticolas

Robert Graham Merkel writes:
> Derek Atkins writes:
>  > Ok, I've sucessfully got the mainline version of GnuCash to build
>  > against g-wrap 0.9.8.  I had to apply the following patches to GnuCash
>  > and g-wrap respectively.
>  > 
>  > I've also built a set of RPMs for RedHat 6.2 (using my own spec-file
>  > which I created back in 0.9.1 days back in May -- I have no idea why
>  > Mark didn't start with what I've done).  In any event, I've improved
>  > it a bit and separated out g-wrap from g-wrap-devel, in case we want
>  > to compile with shared libraries.
>  > 
>  > I'd be more than happy to give anyone the RPMS, SRPMS, or SpecFile as
>  > necessary.  Hopefully my changes (both to g-wrap.m4 and g-wrap.spec)
>  > can get merged back into the g-wrap package.
>  > 
>  
> Thanks very much for the patch. 
> 
> One minor point with the patch to gnucash, though - it'll mean that
> gnucash now depends on g-wrap >= 0.9.8. 
> 
> Dave, if this is a problem, all you have to do is add the autoconf
> test from g-wrap.m4 to gnucash's acinclude.m4.

I have added the patch to the devel tree and placed the patched
version of g-wrap.m4 in acinclude.m4. In the long run, though,
g-wrap.m4 should be picked up from the installation of g-wrap,
I think.

dave

___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Re: Guile 1.3 + G-wrap 0.9.8 patches

2000-11-02 Thread Dave Peticolas

Robert Graham Merkel writes:
> Derek Atkins writes:
>  > Ok, I've sucessfully got the mainline version of GnuCash to build
>  > against g-wrap 0.9.8.  I had to apply the following patches to GnuCash
>  > and g-wrap respectively.
>  > 
>  > I've also built a set of RPMs for RedHat 6.2 (using my own spec-file
>  > which I created back in 0.9.1 days back in May -- I have no idea why
>  > Mark didn't start with what I've done).  In any event, I've improved
>  > it a bit and separated out g-wrap from g-wrap-devel, in case we want
>  > to compile with shared libraries.
>  > 
>  > I'd be more than happy to give anyone the RPMS, SRPMS, or SpecFile as
>  > necessary.  Hopefully my changes (both to g-wrap.m4 and g-wrap.spec)
>  > can get merged back into the g-wrap package.
>  > 
>  
> Thanks very much for the patch. 
> 
> One minor point with the patch to gnucash, though - it'll mean that
> gnucash now depends on g-wrap >= 0.9.8. 

Given that we are going to extend g-wrap to handle glib types,
and that we will require that functionality, we were going to
have to check for a minimum g-wrap version anyway.

dave

___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Guile 1.3 + G-wrap 0.9.8 patches

2000-11-02 Thread Robert Graham Merkel

Derek Atkins writes:
 > Ok, I've sucessfully got the mainline version of GnuCash to build
 > against g-wrap 0.9.8.  I had to apply the following patches to GnuCash
 > and g-wrap respectively.
 > 
 > I've also built a set of RPMs for RedHat 6.2 (using my own spec-file
 > which I created back in 0.9.1 days back in May -- I have no idea why
 > Mark didn't start with what I've done).  In any event, I've improved
 > it a bit and separated out g-wrap from g-wrap-devel, in case we want
 > to compile with shared libraries.
 > 
 > I'd be more than happy to give anyone the RPMS, SRPMS, or SpecFile as
 > necessary.  Hopefully my changes (both to g-wrap.m4 and g-wrap.spec)
 > can get merged back into the g-wrap package.
 > 
 
Thanks very much for the patch. 

One minor point with the patch to gnucash, though - it'll mean that
gnucash now depends on g-wrap >= 0.9.8. 

Dave, if this is a problem, all you have to do is add the autoconf
test from g-wrap.m4 to gnucash's acinclude.m4.


Robert Merkel  [EMAIL PROTECTED]



___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Re: Guile hacking -- accessing backtrace environment frames?

2000-11-02 Thread Dave Peticolas

Derek Atkins writes:
> Dave Peticolas <[EMAIL PROTECTED]> writes:
> 
> > Right. I just checked in some changes to src/guile/gnucash.c.in
> > that makes running as a shell easier. Now, gnucash loads the same
> > startup files regardless of whether it's running as a shell or not.
> > The only difference is whether it invokes gnc:main or drops to the
> > guile shell.
> 
> Ahh, so I don't need to run my script anymore?  Cool!

That's the idea, yeah. Let me know if there are problems.

dave

___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Guile 1.3 + G-wrap 0.9.8 patches

2000-11-02 Thread Derek Atkins

Ok, I've sucessfully got the mainline version of GnuCash to build
against g-wrap 0.9.8.  I had to apply the following patches to GnuCash
and g-wrap respectively.

I've also built a set of RPMs for RedHat 6.2 (using my own spec-file
which I created back in 0.9.1 days back in May -- I have no idea why
Mark didn't start with what I've done).  In any event, I've improved
it a bit and separated out g-wrap from g-wrap-devel, in case we want
to compile with shared libraries.

I'd be more than happy to give anyone the RPMS, SRPMS, or SpecFile as
necessary.  Hopefully my changes (both to g-wrap.m4 and g-wrap.spec)
can get merged back into the g-wrap package.

Enjoy!

-derek

GnuCash CHANGES:
acconfig.h
add SMOB variable
configure.in
hook into g-wrap.m4

G-Wrap Changes:
g-wrap.m4
get it to actually work
clean up the output

Index: acconfig.h
===
RCS file: /home/cvs/cvsroot/gnucash/acconfig.h,v
retrieving revision 1.9
diff -u -r1.9 acconfig.h
--- acconfig.h  2000/09/29 08:01:40 1.9
+++ acconfig.h  2000/11/02 16:58:37
@@ -53,6 +53,9 @@
 /* is guile available */
 #undef HAVE_GUILE
 
+/* New or old Guile Smob for G-wrap */
+#undef GWRAP_OLD_GUILE_SMOB
+
 /* Use the new gtkhtml widget instead of the old xmhtml widget */
 #undef HAVE_LIBGTKHTML
 
Index: configure.in
===
RCS file: /home/cvs/cvsroot/gnucash/configure.in,v
retrieving revision 1.140
diff -u -r1.140 configure.in
--- configure.in2000/10/23 09:40:30 1.140
+++ configure.in2000/11/02 16:58:40
@@ -264,29 +264,22 @@
 G_WRAP_COMPILE_ARGS=""
 G_WRAP_LINK_ARGS=""
 
-# Find the configure script
-AC_PATH_PROG(G_WRAP_CONFIG,g-wrap-config)
+AM_PATH_GWRAP(, , [AC_MSG_ERROR([
 
-if test -x "${G_WRAP_CONFIG}";
-then
-  # Find out what the g-wrap compile and link flags are.
-  G_WRAP_COMPILE_ARGS=`${G_WRAP_CONFIG} --c-compile-args guile`
-  G_WRAP_LINK_ARGS=`${G_WRAP_CONFIG} --c-static-link-args guile`
-fi
+  g-wrap does not appear to be installed correctly.  If you need to
+  install g-wrap, you can find it at ftp://ftp.gnucash.org/pub/g-wrap.
+])])
 
-# Find the tool
-AC_PATH_PROG(G_WRAP, g-wrap)
+# Find out what the g-wrap compile and link flags are.
+AC_MSG_CHECKING(for g-wrap compile args)
+G_WRAP_COMPILE_ARGS=`${G_WRAP_CONFIG} --c-compile-args guile`
+AC_MSG_RESULT($G_WRAP_COMPILE_ARGS)
 
-if test x"${G_WRAP_COMPILE_ARGS}" = x || \
-   test x"${G_WRAP_LINK_ARGS}" = x || \
-   test ! -x "${G_WRAP}";
-then
-  AC_MSG_ERROR([
+AC_MSG_CHECKING(for g-wrap link args)
+G_WRAP_LINK_ARGS=`${G_WRAP_CONFIG} --c-static-link-args guile`
+AC_MSG_RESULT($G_WRAP_LINK_ARGS)
 
-  g-wrap does not appear to be installed.  It must be installed and
-  its binary directory must be in your PATH.  If you need to install
-  g-wrap, you can find it at ftp://ftp.gnucash.org/pub/g-wrap.])
-fi
+AC_GWRAP_CHECK_GUILE
 
 AC_SUBST(G_WRAP)
 AC_SUBST(G_WRAP_CONFIG)



--- g-wrap-0.9.8/g-wrap.m4.no   Wed Nov  1 23:04:06 2000
+++ g-wrap-0.9.8/g-wrap.m4  Thu Nov  2 11:46:27 2000
@@ -8,7 +8,7 @@
 [if test x$GUILE = x ; then
AC_PATH_PROG(GUILE, guile, no)
  fi
- AC_MSG_WARN(guile is $GUILE)
+ dnl AC_MSG_WARN(guile is $GUILE)
  if test "${GUILE}" = "no" ; then
AC_MSG_ERROR(g-wrap couldn't find guile.)
  fi
@@ -19,9 +19,13 @@
  dnl in your acconfig.h or config.h.in, and
  dnl include that config.h.  If not, your code will not
  dnl work with guile 1.3
+ AC_MSG_CHECKING(for whether guile uses old SMOB format)
  if ${GUILE} -c '(if (string=? (version) "1.3") (exit 0) (exit 1))' ;
  then
+   AC_MSG_RESULT(yes)
 AC_DEFINE(GWRAP_OLD_GUILE_SMOB)
+ else
+   AC_MSG_RESULT(no)
  fi
 ])
 
@@ -44,8 +48,6 @@
AC_PATH_PROG(GUILE, guile, no)
 fi
 
-AC_MSG_CHECKING(for g-wrap - version >= ${min_gwrap_version})
-
 dnl if prefix set, then set them explicitly
 if test x${gwrap_prefix} != x ; then
G_WRAP = ${gwrap_prefix}/bin/g-wrap
@@ -54,19 +56,21 @@
 
AC_PATH_PROG(G_WRAP, g-wrap, no)
if test x${G_WRAP} = xno ; then
-   AC_MSG_RESULT(no)
CHECK_VERSION="no"
-   ifelse([$3], , true , [$3])
+   ifelse([$3], , true , [AC_MSG_WARN(g-wrap failed)
+   $3])
fi
   AC_PATH_PROG(G_WRAP_CONFIG, g-wrap-config, no)
   if test x${G_WRAP_CONFIG} = xno ; then
-   AC_MSG_RESULT(no)
CHECK_VERSION="no"
-   ifelse([$3], , true , [$3])
+   ifelse([$3], , true , [AC_MSG_WARN(g-wrap-config failed)
+   $3])
   fi
 fi
 
 if test x$CHECK_VERSION != xno ; then
+AC_MSG_CHECKING(for g-wrap - version >= ${min_gwrap_version})
+
 gwrap_major_version=`${G_WRAP} --version | \
sed 's/g-wrap \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
 gwrap_minor_version=`${G_WRAP} --version | \
@@ -89,7 +93,11 @@
   ((< ${gwrap_micro_version} ${micro_required}) (exit 1))\
   (else (exit 0)))" ; then

Re: QIF importer in 1.4.7 fails to detect duplicate transactions

2000-11-02 Thread Derek Atkins

Currently, only one of my (at least 3) online banks supports OFX.
All three (that I check regularly) support QIF.

-derek

Rob Browning <[EMAIL PROTECTED]> writes:

> One thing that might be worth surveying is how many banks support OFX
> and QIF now?  If it's most of them, and the others are moving in that
> direction, and if the OFX info is more complete, it might make sense
> to focus efforts there.  If so, I'd be happy to help with advise,
> etc. on the libXML front.
> 
> -- 
> Rob Browning <[EMAIL PROTECTED]> PGP=E80E0D04F521A094 532B97F5D64E3930

-- 
   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  N1NWH
   [EMAIL PROTECTED]PGP key available

___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Re: QIF importer in 1.4.7 fails to detect duplicate transactions

2000-11-02 Thread Rob Browning

Derek Atkins <[EMAIL PROTECTED]> writes:

> Thats fine.  I'm not really complaining that the functionality
> doesn't exist, just that I think it should happen.  Clearly others
> think it should happen, too.  Personally, I want to work on the next
> step (because it's what *I* want to do with GnuCash ;)

One thing that might be worth surveying is how many banks support OFX
and QIF now?  If it's most of them, and the others are moving in that
direction, and if the OFX info is more complete, it might make sense
to focus efforts there.  If so, I'd be happy to help with advise,
etc. on the libXML front.

-- 
Rob Browning <[EMAIL PROTECTED]> PGP=E80E0D04F521A094 532B97F5D64E3930

___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Re: Can people with older RedHat systems test g-wrap-0.9.7?

2000-11-02 Thread Derek Atkins

Ok, I've build 0.9.8 on RedHat 6.2 (I even built a set of RPMS for it
:)

Unfortunately, it doesn't work for me.  The mainline CVS tree doesn't
have any tests for g-wrap against guile 1.3, so it fails to set the
proper SMOB setting.  I'm currently working on patches to the
configuration for this to work, but it looks like there are problems
with the g-wrap.m4 file as well.  Argh.  At least I can control both
of them in the short-term...

I'll let you all know when I solve the problem.

-derek

Rob Browning <[EMAIL PROTECTED]> writes:

> Robert Graham Merkel <[EMAIL PROTECTED]> writes:
> 
> > Rob, the new file I added (g-wrap.m4) is not present in the
> > tarball.  I think I probably forgot to add something to Makefile.am :(
> > 
> > Additionally, the fix won't solve gnucash's problems until somebody
> > patches gnucash's configure.in and acconfig.h.
> > 
> > So, until we fix this, could everyone hold off for a moment or two?
> 
> OK, everyone have at it.  0.9.8's up there and should DTRT now.
> 
> -- 
> Rob Browning <[EMAIL PROTECTED]> PGP=E80E0D04F521A094 532B97F5D64E3930
> 
> ___
> gnucash-devel mailing list
> [EMAIL PROTECTED]
> http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel

-- 
   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  N1NWH
   [EMAIL PROTECTED]PGP key available

___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Re: Guile hacking -- accessing backtrace environment frames?

2000-11-02 Thread Rob Browning

Dave Peticolas <[EMAIL PROTECTED]> writes:

> Right. I just checked in some changes to src/guile/gnucash.c.in
> that makes running as a shell easier. Now, gnucash loads the same
> startup files regardless of whether it's running as a shell or not.
> The only difference is whether it invokes gnc:main or drops to the
> guile shell.

OK.  In the "old days" I hadn't done that because you wanted to be
able to debug the startup functions from guile, but I don't think
that's really a big issue anymore, and we can always add an option
like --no-X that brings you up to a "minimal" prompt later if we
need it.

-- 
Rob Browning <[EMAIL PROTECTED]> PGP=E80E0D04F521A094 532B97F5D64E3930

___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Re: Implementing proper cost basis tracking for shares

2000-11-02 Thread Bill Gribble

On Mon, Oct 30, 2000 at 03:51:13PM +1100, Robert Graham Merkel wrote:
> Rob Browning writes:
>  > I'm not fully versed in all the financial ramifications, but I left
>  > that discussion thinking that practically speaking, we could really
>  > only track the events (buys/sells/splits/etc.) as the "facts", and
>  > needed to leave the computation of cost-basis, etc. up to a separate,
>  > and more flexible, "computation" process that would run later.
>  > 
> Correct.  We only need to record which shares are sold - the
> computation of costs is done at the reporting stage.

Sorry to jump in here so late.  I have done a bit of study on this
issue, at least for US tax law, and let me point out that recording
"which shares are sold" is not only optional, but in fact if you want
to do it legally you actually have to do some stuff like write a
letter to your broker with the shares you wish to sell listed... you
have to have written proof that you designated particular shares to
sell to your broker at the time of sale.

We have a representational problem: there's nowhere that we record the
information that's relevant for tax purposes (i.e. an enumeration of
share numbers for shares bought and sold).  If the parcels of shares
you sell happen to be the same parcels that you bought, the problem is
a little simpler, but in general it's not going to work that way.

In the US, the only choices you have for stocks are FIFO and SID
(Specific Identification, what we're talking about here).  For mutual
funds you can also use a method called "Average Cost".

b.g.


___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Re: Patching gnucash to take advantage of g-wrap 0.9.8

2000-11-02 Thread Derek Atkins

The problem is that g-wrap.m4 is being added to aclocal.m4 via
the aclocal program, which is run from autogen.sh.

-derek

Robert Graham Merkel <[EMAIL PROTECTED]> writes:

> Dave, 
>   the new version of g-wrap (0.9.8) contains a couple of autoconf
> macros in a a file g-wrap.m4, which gets installed into
> {prefix}/share/aclocal.  On my machines that's
> /usr/local/share/aclocal, but just to check I've created a symlink 
> to /usr/share/aclocal, and it doesn't seem to matter for the
> discussion below.
> 
> I've modified CVS's makefile to support this change, and it seems to
> do the job (could still do with somebody who knows autoconf better to
> clean it up, though).  However, when I run autoconf on 1.4.8 I get the
> following:
> 
>  ~/programming/gnc/gnucash-1.4.8 : autoconf
> configure.in:42: warning: AC_TRY_RUN called without default to allow cross compiling
> autoconf: Undefined macros:
> configure.in:408:AC_GWRAP_CHECK_GUILE
> 
> Obviously, autoconf isn't seeing g-wrap.m4, but when autogen.sh is
> called from CVS gnucash, it's not a problem.  Any idea what's going on?
> 
> 
> Robert Merkel[EMAIL PROTECTED]
> 
> 
> 
> ___
> gnucash-devel mailing list
> [EMAIL PROTECTED]
> http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel

-- 
   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  N1NWH
   [EMAIL PROTECTED]PGP key available

___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Re: Guile hacking -- accessing backtrace environment frames?

2000-11-02 Thread Derek Atkins

Dave Peticolas <[EMAIL PROTECTED]> writes:

> Right. I just checked in some changes to src/guile/gnucash.c.in
> that makes running as a shell easier. Now, gnucash loads the same
> startup files regardless of whether it's running as a shell or not.
> The only difference is whether it invokes gnc:main or drops to the
> guile shell.

Ahh, so I don't need to run my script anymore?  Cool!

-derek

#!/bin/sh

export GNC_DEBUG=t
export GNC_RUN_AS_SHELL=t
export GNC_BOOTSTRAP_SCM=/var/tmp/gnucash/share/gnucash/scm/bootstrap.scm

cat < dave

-- 
   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  N1NWH
   [EMAIL PROTECTED]PGP key available

___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Re: Guile hacking -- accessing backtrace environment frames?

2000-11-02 Thread Derek Atkins

Rob Browning <[EMAIL PROTECTED]> writes:

> Derek Atkins <[EMAIL PROTECTED]> writes:
> 
> OK, without me actually testing anything, just poking around, how
> about the "Debugger options" section of the guile info pages?  Does
> that help?  I see there's a way to turn on backtracing on error.  I
> think we may turn that off in gnucash unless the --debug option is
> enabled.

I've looked there already -- it's, umm, minimalistic at best, and
useless at worst.  Backtracing is already turned on, but I want to be
able to get to a particular stack frame and look at the local
environent.  The Debugger Options doesn't show or explain how to do
that.  Indeed, most of the debugger is undocumented.

> Rob Browning <[EMAIL PROTECTED]> PGP=E80E0D04F521A094 532B97F5D64E3930

-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  N1NWH
   [EMAIL PROTECTED]PGP key available

___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel



Re: Perl API

2000-11-02 Thread Darren/Torin/Who Ever...

Rob Browning, in an immanent manifestation of deity, wrote:
>If SWIG does a good job, then yes, but if it's not going to provide a
>good solution, then I'd rather just see each interested group create
>and maintain bindings for that language until/if/unless there's a
>unified solution that actually DTRT.  I don't know enoug about SWIG
>these days to know the answer to that.

Okay.  Well, when the gnucash API stabilizing again, we can evaluate
swig then and see if it's up to our needs.  If not, we'll do other
things.  :)

>Actually, using guile's kinda nice.  We have a lot of control over
>what happens, and how it happens.  For example, I'm about to see about
>adding both dynamic linking (a la "dlopen") so that you can just say

Cool.  I just don't want to have to deal with thinking in -yet- another
language...

Darren
-- 
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]><[EMAIL PROTECTED]>
Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-206-ELF-LIPZ
@Make a little hot-tub in your soul.  @

___
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel