 	      (unless (looking-at "(")
 		(error (buffer-string)))
 	      (read (current-buffer))))))
+    (setq ledger-bufs ())
     (if (> (length items) 0)
 	(dolist (item items)
 	  (let ((index 1))
 	    (dolist (xact (nthcdr 5 item))
 	      (let ((beg (point))  
 		    (where (ledger-marker-where-xact-is item)))
+		(add-to-list 'ledger-bufs (car where))
 		(insert (format "%s %-4s %-30s %-30s %15s\n"
 				(format-time-string "%Y/%m/%d" (nth 2 item))
 				(if (nth 3 item)

;; Reconcile mode

(defvar ledger-buf nil)
(defvar ledger-acct nil)
(defcustom ledger-recon-buffer-name "*Reconcile*"
  "Name to use for reconciliation window"


(defun ledger-reconcile-save ()
  (interactive)
  (dolist (buf (cons ledger-buf ledger-bufs))
    (with-current-buffer buf
      (save-buffer)))
  (set-buffer-modified-p nil)
  (ledger-display-balance))

