Add a function to "dwim" align.
If no region is active, align the current transaction. If a region is active, align all postings in the region.
This commit is contained in:
parent
88ad616d18
commit
e6a2579f34
1 changed files with 7 additions and 0 deletions
|
|
@ -146,6 +146,13 @@ at beginning of account"
|
|||
(setq lines-left (not (eobp)))))
|
||||
(setq inhibit-modification-hooks nil))))
|
||||
|
||||
(defun ledger-post-align-dwim ()
|
||||
"Align all the posting of the current xact the current region."
|
||||
(interactive)
|
||||
(if (use-region-p)
|
||||
(call-interactively 'ledger-post-align-postings)
|
||||
(call-interactively 'ledger-post-align-xact)))
|
||||
|
||||
(defun ledger-post-edit-amount ()
|
||||
"Call 'calc-mode' and push the amount in the posting to the top of stack."
|
||||
(interactive)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue