ledger.el old ledger mode. I maintain a branch locally to always
restore C-x C-s keyboard shortcut that is so deeply inside my Emacs
muscle memory. I propose to restore this definitely.
completing payees with ledger-magic-tab would add a space when
there was only one possible completion. That space, in ledger's
file format, would always need to be deleted again
it might be helpful when completing accounts to add two spaces, but
the current completion code organization can't (easily) distinguish
between payee and account completion. Adding one space is harmful
to account completion too, in that `ledger-account.*regex' parse
accounts by looking for two spaces, and treat an account name ending
with a single space before the newline as having the space as part
of the account name.
the year field in dates is sort-of optional, given "year" or "Y"
directives. Make the date regex understand this. (This has been lightly
tested with C-c C-a, but the rest of the uses of ledger-iso-date-regex
have only been eyeballed, not properly audited or tested)
When the right place to add a transaction is after all existing
transactions, add it just after the last transaction rather than at the
end of the buffer. (Otherwise the transactions get added after Local
Variables blocks and any other endmatter.)
On dark backgrounds, the color for the current transaction makes the
text quite unreadable. Let's use a darker color in this case. Maybe some
other colors could be adjusted.
Running `ledger-insert-effective-date' will now prompt for a date with
a pre-filled value of the `(ledger-year-and-month)' ("2014/01/"). Just
pressing RET without inserting the 'day'-portion will insert the date
of today.
Provide completions based on information retrieved with 'ledger-context-at-point'.
To support step-by-step completion of transactions some more patterns were added
to 'ledger-line-config'. The actual completion rules mostly reuse some of the
convenient input commands that are buried in ledger-mode. Using the standard
pcomplete termination string (" ") to allow a "context switch" at the end of each
completion step.
Some elisp functions depend on a date-format supplied in ~/.ledgerrc. Change these by introducing a default ("%Y/%m/%d").
Signed-off-by: Moritz Ulrich <moritz@tarn-vedra.de>