       (delete-region (point) (1+ (line-end-position)))
       (set-buffer-modified-p t))))
 
+(defun ledger-reconcile-visit ()
+  (interactive)
+  (let ((where (get-text-property (point) 'where)))
+    (switch-to-buffer-other-window ledger-buf)
+    (goto-char where)))
+
 (defun ledger-reconcile-save ()
   (interactive)
   (with-current-buffer ledger-buf
     (save-buffer))
   (set-buffer-modified-p nil)
   (ledger-display-balance))
+
+(defun ledger-reconcile-finish ()
+  (interactive)
+  (save-excursion
+    (goto-char (point-min))
+    (while (not (eobp))
+      (let ((where (get-text-property (point) 'where))
+	    (face  (get-text-property (point) 'face)))
+	(if (eq face 'bold)
+	    (with-current-buffer ledger-buf
+	      (goto-char where)
+	      (ledger-toggle-current 'cleared))))
+      (forward-line 1)))
+  (ledger-reconcile-save))
 
 (defun ledger-do-reconcile ()
   (let* ((buf ledger-buf)

	 (items
	  (with-temp-buffer
	    (let ((exit-code
		   (ledger-run-ledger buf "--reconcilable" "emacs" account)))
	      (when (= 0 exit-code)
		(goto-char (point-min))
		(unless (looking-at "(")

		(re-search-backward "^[0-9]" nil t))
	(skip-chars-forward "0-9./")
	(delete-horizontal-space)
	(if (member (char-after) '(?\* ?\!))
	    (progn
	      (delete-char 1)
	      (if (and style (eq style 'cleared))
		  (insert " *")))
	  (if (and style (eq style 'pending))
	      (insert " ! ")
	    (insert " * "))
	  (setq clear t))))
    clear))

