summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README-1ST43
-rw-r--r--doc/ledger.120
-rw-r--r--doc/ledger3.texi4
-rw-r--r--src/textual.cc6
-rw-r--r--test/regress/0161EB1E.test15
5 files changed, 64 insertions, 24 deletions
diff --git a/README-1ST b/README-1ST
index 45e9800a..b92b2f6a 100644
--- a/README-1ST
+++ b/README-1ST
@@ -5,9 +5,12 @@ To build this code after doing a Git clone, run:
$ ./acprep update
-If you try to configure and build on your own, you are almost certainly going
-to run into problems. In future, you can run this command again and again,
-and it will keep you updated to the very latest version.
+If anything goes wrong, see "COMMON CONFIGURE/BUILD PROBLEMS" below.
+
+If you try to configure and build without running acprep first, you are
+almost certainly going to run into problems. In future, you can run
+'acprep update' again and again, and it will keep you updated to the
+very latest version.
I further recommend building both debug and optimized versions of Ledger, in a
subdirectory of your source tree named 'build' (which acprep will manage for
@@ -21,8 +24,8 @@ Now install the optimized version, but know that you have 'build/debug/ledger'
available for testing and more useful bug reports.
===============================================================================
-
- IF YOU HAVE CONFIGURE OR BUILD PROBLEMS
+COMMON CONFIGURE/BUILD PROBLEMS:
+===============================================================================
To build and install Ledger requires several dependencies on various
platforms. You can install these dependencies very simply for most of them
@@ -41,8 +44,9 @@ With the contents of config.log, and the output from acprep --debug update,
it's usually fairly obvious where things have gone astray.
===============================================================================
+F.A.Q.:
+===============================================================================
- F.A.Q.
- Q: The build fails saying it can't find utf8.h
@@ -50,6 +54,29 @@ it's usually fairly obvious where things have gone astray.
----------------------------------------------------------------------
+ - Q: './acprep update' gives errors
+
+ A: You're probably missing some dependency libraries. Did you run
+ './acprep dependencies'? If you tried that too and it didn't
+ work, then you may need to install dependencies by hand. On a
+ Debian GNU/Linux system (or Debian-based system such as Ubuntu),
+ something this should work (as root):
+
+ # aptitude update
+ # for name in \
+ cmake libboost-dev libboost-date-time-dev libboost-doc \
+ libboost-dbg libboost-filesystem-dev libboost-graph-dev \
+ libboost-iostreams-dev libboost-program-options-dev \
+ libboost-python-dev libboost-regex-dev \
+ libboost-serialization-dev libboost-signals-dev \
+ libboost-test-dev libboost-thread-dev libboost-wave-dev \
+ libmpfr-dev libmpfr-dbg libmpfr-doc; \
+ do \
+ aptitude install ${name}; \
+ done
+
+ ----------------------------------------------------------------------
+
- Q: Configure fails saying it can't find boost_regex
A: Look in config.log and search for "boost_regex", then scroll down a bit
@@ -68,7 +95,9 @@ it's usually fairly obvious where things have gone astray.
- Q: Configure fails saying it can't find MPFR
A: You need MPFR version 2.4.0 or higher. This version does not come with
- most Debian distributions, so you will need to build it.
+ most Debian distributions, so you will need to build it. The
+ relevant packages are 'libmpfr-dev' and 'libmpfr-dbg'. See also
+ the question above about "'./acprep update' gives errors".
----------------------------------------------------------------------
diff --git a/doc/ledger.1 b/doc/ledger.1
index b96e4a7d..659d3fbb 100644
--- a/doc/ledger.1
+++ b/doc/ledger.1
@@ -92,29 +92,23 @@ Report of postings matching the
.Ar report-query
in CSV format (comma-separated values). Useful for exporting data to a
spreadsheet for further analysis or charting.
-.It Nm draft Oo Ar draft-template Oc
+.It Nm entry Oo Ar entry-template Oc
Generate and display a new, properly formatted Ledger transaction by comparing
the
-.Ar draft-template
+.Ar entry-template
to the transactions in your data file(s). For more information on draft
templates and using this command to quickly create new transactions, see the
section
-.Sx DRAFTS .
+.Sx ENTRIES .
.Pp
-The synonyms
-.Nm entry
-and
+The synonym
.Nm xact
-are also accepted.
+is also accepted.
.It Nm emacs Oo Ar query Oc
Outputs posting and transaction data in a format readily consumed by the Emacs
editor, in a series of Lisp forms. This is used by the
.Li ledger.el
Emacs mode to process reporting data from Ledger.
-.Pp
-The synonym
-.Nm lisp
-is also accepted.
.It Nm equity Oo Ar report-query Oc
Prints a series of transactions that balance current totals for
accounts matching the
@@ -586,9 +580,9 @@ for example:
.It Nm xact
.El
.Pp
-.Sh DRAFTS
+.Sh ENTRIES
.Pp
-.Sh FORMATS
+.Sh FORMATS
.Pp
.Sh DEBUG COMMANDS
In addition to the regular reporting commands, Ledger also accepts several
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index e377f02d..b60a0f5c 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -7800,7 +7800,7 @@ useful to follow standard accounting practice (@pxref{Principles of
Accounting}).
Since an amount is missing from the second posting, it is assumed to
-be the inverse of the first. This guarantee the cardinal rule of
+be the inverse of the first. This guarantees the cardinal rule of
double-entry accounting: the sum of every transaction must balance to
zero, or it is in error. Whenever Ledger encounters a @dfn{null
posting} in a transaction, it uses it to balance the remainder.
@@ -8199,6 +8199,8 @@ need to create sums of multiple commodities, use a Balance. For example:
@itemize
@item OFX support has been removed from Ledger 3.0
@item single character value expressions are deprecated and should be changed to the new value expressions available in 3.0
+@item @code{draft} command is no longer supported, use @code{entry} or @code{exact}
+@item @code{lisp} command is no longer supported, use @code{emacs}.
@end itemize
@node Example Data File, Miscellaneous Notes, Major Changes from version 2.6, Top
diff --git a/src/textual.cc b/src/textual.cc
index 0ead9232..8a055251 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -148,7 +148,7 @@ namespace {
void account_value_directive(account_t * account, string expr_str);
void account_default_directive(account_t * account);
- void default_account_directive(char * line);
+ void default_account_directive(char * args);
void alias_directive(char * line);
void payee_directive(char * line);
@@ -397,7 +397,7 @@ void instance_t::read_next_directive(bool& error_flag)
#endif // TIMELOG_SUPPORT
case 'A': // a default account for unbalanced posts
- default_account_directive(line);
+ default_account_directive(line + 1);
break;
case 'C': // a set of conversions
price_conversion_directive(line);
@@ -492,7 +492,7 @@ void instance_t::default_commodity_directive(char * line)
void instance_t::default_account_directive(char * line)
{
- context.journal->bucket = top_account()->find_account(skip_ws(line + 1));
+ context.journal->bucket = top_account()->find_account(skip_ws(line));
context.journal->bucket->add_flags(ACCOUNT_KNOWN);
}
diff --git a/test/regress/0161EB1E.test b/test/regress/0161EB1E.test
new file mode 100644
index 00000000..93498ad5
--- /dev/null
+++ b/test/regress/0161EB1E.test
@@ -0,0 +1,15 @@
+bucket Assets:Checking
+2011/04/25 Tom's Used Cars
+ Auto $ 5,500.00
+ ; :nobudget:
+
+A Assets:Checking
+2011/04/27 Book Store
+ Books $20.00
+
+test reg
+11-Apr-25 Tom's Used Cars Auto $ 5,500.00 $ 5,500.00
+ Assets:Checking $ -5,500.00 0
+11-Apr-27 Book Store Books $ 20.00 $ 20.00
+ Assets:Checking $ -20.00 0
+end test