Add support for live preview of ledger xact output while adding transactions
Add a new customization, ledger-add-transaction-idle-preview (enabled by
default) to display a preview of the ledger xact output that would be inserted
in the ledger buffer as the user is inputting a transaction text in
ledger-add-transaction. (Also affects ledger-reconcile-add).
ledger xact's exact output can be quite unpredictable, since it is hard to
remember exactly what payees exist in a ledger file, and since it depends on the
most recent transactions that match the inputted strings. Displaying a live
preview that can inform the user how to make their input more specific is a much
nicer experience than "hit enter, see that the resulting transaction is wrong,
undo, press C-c C-a again, enter date again, then press M-p to bring up previous
input".
Close #456.
I've noticed at least one issue where the current version may sometimes swallow the user's input. I'll need to see if we're interacting with while-no-input in a bad way...
I've fixed the bad interactions with while-no-input by switching to make-process. This caused a performance hit, which I fixed by writing the buffer contents to a temp file, which is an improvement over call-process-region anyway.
... and, actually delete the temp file when we're done previewing.