summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/ledger3.texi6
-rw-r--r--lisp/ldg-reconcile.el11
2 files changed, 16 insertions, 1 deletions
diff --git a/doc/ledger3.texi b/doc/ledger3.texi
index ee4c990b..79ce0b0d 100644
--- a/doc/ledger3.texi
+++ b/doc/ledger3.texi
@@ -2502,13 +2502,17 @@ all of the uncleared transactions. The reconcile buffer has several functions:
@item C-x C-s
to save changes (to the ledger file as well).
@item q
- quite the reconcile mode
+ quit the reconcile mode
@item n p
next line or previous line
@item A
add entry
@item D
delete entry
+ @item g
+ reconcile new account
+ @item b
+ show cleared balance in mini-buffer
@item C-l
refresh display
@end table
diff --git a/lisp/ldg-reconcile.el b/lisp/ldg-reconcile.el
index 011bf400..aaccfb07 100644
--- a/lisp/ldg-reconcile.el
+++ b/lisp/ldg-reconcile.el
@@ -26,6 +26,7 @@
(defun ledger-display-balance ()
"Calculate the cleared balance of the account being reconciled"
+ (interactive)
(let ((buffer ledger-buf)
(account ledger-acct))
(with-temp-buffer
@@ -64,6 +65,11 @@
(forward-line)
(ledger-display-balance)))
+(defun ledger-reconcile-new-account (account)
+ (interactive "sAccount to reconcile: ")
+ (set (make-local-variable 'ledger-acct) account)
+ (ledger-reconcile-refresh))
+
(defun ledger-reconcile-refresh ()
(interactive)
(let ((inhibit-read-only t)
@@ -203,10 +209,12 @@
(define-key map [? ] 'ledger-reconcile-toggle)
(define-key map [?a] 'ledger-reconcile-add)
(define-key map [?d] 'ledger-reconcile-delete)
+ (define-key map [?g] 'ledger-reconcile-new-account)
(define-key map [?n] 'next-line)
(define-key map [?p] 'previous-line)
(define-key map [?s] 'ledger-reconcile-save)
(define-key map [?q] 'ledger-reconcile-quit)
+ (define-key map [?b] 'ledger-display-balance)
(define-key map [menu-bar] (make-sparse-keymap "ldg-recon-menu"))
(define-key map [menu-bar ldg-recon-menu] (cons "Reconcile" map))
@@ -220,6 +228,9 @@
(define-key map [menu-bar ldg-recon-menu add] '("Add Entry" . ledger-reconcile-add))
(define-key map [menu-bar ldg-recon-menu tog] '("Toggle Entry" . ledger-reconcile-toggle))
(define-key map [menu-bar ldg-recon-menu sep3] '("--"))
+ (define-key map [menu-bar ldg-recon-menu bal] '("Show Cleared Balance" . ledger-display-balance))
+ (define-key map [menu-bar ldg-recon-menu sep4] '("--"))
+ (define-key map [menu-bar ldg-recon-menu rna] '("Reconcile New Account" . ledger-reconcile-new-account))
(define-key map [menu-bar ldg-recon-menu ref] '("Refresh" . ledger-reconcile-refresh))
(define-key map [menu-bar ldg-recon-menu sav] '("Save" . ledger-reconcile-save))