For ledger-post-align-postings to run on xacts added with ledger-add

This commit is contained in:
Craig Earls 2014-07-15 20:44:32 -07:00
parent 3f9fc276d3
commit 03de326eff
2 changed files with 2 additions and 2 deletions

View file

@ -104,7 +104,6 @@ at beginning of account"
"Align all accounts and amounts within region, if there is no "Align all accounts and amounts within region, if there is no
region align the posting on the current line." region align the posting on the current line."
(interactive) (interactive)
(assert (eq major-mode 'ledger-mode))
(save-excursion (save-excursion
(if (or (not (mark)) (if (or (not (mark))

View file

@ -200,7 +200,8 @@ correct chronological place in the buffer."
(goto-char (point-min)) (goto-char (point-min))
(if (looking-at "Error: ") (if (looking-at "Error: ")
(error (concat "Error in ledger-add-transaction: " (buffer-string))) (error (concat "Error in ledger-add-transaction: " (buffer-string)))
(buffer-string))) (ledger-post-align-postings (point-min) (point-max))
(buffer-string)))
"\n")) "\n"))
(progn (progn
(insert (car args) " \n\n") (insert (car args) " \n\n")