 					 'where (nth 0 item)))
 	    (set-text-properties beg (1- (point))
 				 (list 'where (nth 0 item)))))
-	(goto-char (point-min))))))
+	(goto-char (point-min)))
+      (when arg
+	(let (cleared)
+	  ;; attempt to auto-reconcile in the background
+	  (with-temp-buffer
+	    (let ((exit-code
+		   (ledger-run-ledger
+		    "--format" "\"%B\\n\"" "reconcile"
+		    (concat "\"" account "\"")
+		    (with-temp-buffer
+		      (insert (read-string "Reconcile account to: "))
+		      (goto-char (point-min))
+		      (while (re-search-forward "\\([&$]\\)" nil t)
+			(replace-match "\\\\\\1"))
+		      (buffer-string)))))
+	      (when (= 0 exit-code)
+		(goto-char (point-min))
+		(while (not (eobp))
+		  (setq cleared
+			(cons (1+ (read (current-buffer))) cleared))
+		  (forward-line)))))
+	  (goto-char (point-min))
+	  (with-current-buffer buf
+	    (setq cleared (mapcar 'copy-marker (nreverse cleared))))
+	  (dolist (pos cleared)
+	    (while (and (not (eobp))
+			(/= pos (get-text-property (point) 'where)))
+	      (forward-line))
+	    (unless (eobp)
+	      (ledger-reconcile-toggle t)))
+	  (goto-char (point-min))
+	  (ledger-update-balance-display))))))
 
 (defun ledger-align-dollars (&optional column)
   (interactive "p")

			      (line-end-position)
			      (list 'face)))
    (forward-line)
    (ledger-update-balance-display)))

(defun ledger-reconcile (account)
  (interactive "sAccount to reconcile: ")
  (let* ((items (save-excursion
		  (goto-char (point-min))
		  (ledger-parse-entries account)))

			"]"))))))
  (force-mode-line-update))

(defun ledger-reconcile-toggle (&optional no-update)
  (interactive)
  (let ((where (get-text-property (point) 'where))
	(account ledger-acct)
