     (ledger-display-balance)))
 
 (defun ledger-reconcile-refresh ()
-  "Force the reconciliation window to refresh."
+  "Force the reconciliation window to refresh.
+Return the number of uncleared xacts found."
   (interactive)
   (let ((inhibit-read-only t)
         (line (count-lines (point-min) (point))))
     (erase-buffer)
-    (ledger-do-reconcile)
-    (set-buffer-modified-p t)
-    (goto-char (point-min))
-    (forward-line line)))
+    (prog1 (ledger-do-reconcile)
+      (set-buffer-modified-p t)
+      (goto-char (point-min))
+      (forward-line line))))
 
 (defun ledger-reconcile-refresh-after-save ()
   "Refresh the recon-window after the ledger buffer is saved."

      (save-excursion
	(if ledger-fold-on-reconcile
	    (ledger-occur-mode account ledger-buf)))
      (ledger-reconcile-refresh)
      (goto-char (point-min))
      (ledger-reconcile-change-target)
      (ledger-display-balance))))

(defvar ledger-reconcile-mode-abbrev-table)

    (set-buffer-modified-p nil)
    (toggle-read-only t)

    (ledger-reconcile-ensure-xacts-visible)
    (length xacts)))

(defun ledger-reconcile-ensure-xacts-visible ()
  "Ensures that the last of the visible transactions in the
