The old implementation used an account formatter, and was very
specialized. The new is done as a transaction filter, and works along
with everything else, eliminating bugs special to the equity report.
As a result, --wide is working again, and --wide-register-format has
been removed. Also, the following new options are recognized, for
controlling per-column formatting:
--date-width NUM
--payee-width NUM
--account-width NUM
--amount-width NUM
--total-width NUM
These fully generalize the previous --payee-as-account and such options,
which, for example, is now implemented to be the same as saying,
"--set-account payee".
To help with gathering specific reports:
- --payee-as-account copies the entry's payee field to the account,
allowing the subtotal report to show unique payees for each period.
- --comm-as-account copies the transaction's amount's commodity to the
account.
- --code-as-account copies the entry's code to the account
Also created aliases for some of these options, for conistency's sake:
- --commodity-as-payee is now an alias for --comm-as-payee
- --commodity-as-account is now an alias for --comm-as-account
Previously, account-wise reports used a subset of the total number of
transaction filters, but this could cause confusing results, and made
some reports immpossible (such as account-wise monthly averages).
The prices report now uses the following scheme:
PAYEE -> name of commodity of price
ACCOUNT -> name of commodity of item
AMOUNT -> price
DATE -> date of pricing
However, the report does not show the payee. The only reason the payee
is set is to enable clever querying. For example:
ledger prices gold # show all known prices for GOLD
ledger prices @gold # show all known prices *in* GOLD
Created a new function, session_t::reread_journal_files, which throws
away all previous state data and reads in the same files again. This is
needed to allow Emacs to communicate with Ledger via the REPL, so that
it tell Ledger when it has made changes to the user's data file.
This can be used to format dates with a specific pattern, such as:
format_date(entry.date, "%Y/%m/%d")
This is used by the print command to ensure that Ledger is able to parse
back what it prints.