 	  (ledger-reconcile-toggle))))
     (goto-char (point-min))))
 
+(defun ledger-reconcile-add ()
+  (interactive)
+  (with-current-buffer ledger-buf
+    (call-interactively #'ledger-add-entry))
+  (let ((inhibit-read-only t))
+    (erase-buffer)
+    (ledger-do-reconcile)
+    (set-buffer-modified-p t)))
+
+(defun ledger-reconcile-delete ()
+  (interactive)
+  (let ((where (get-text-property (point) 'where)))
+    (with-current-buffer ledger-buf
+      (goto-char where)
+      (ledger-delete-current-entry))
+    (let ((inhibit-read-only t))
+      (goto-char (line-beginning-position))
+      (delete-region (point) (1+ (line-end-position)))
+      (set-buffer-modified-p t))))
+
 (defun ledger-reconcile-save ()
   (interactive)
   (with-current-buffer ledger-buf

  (set-buffer-modified-p nil)
  (ledger-display-balance))

(defun ledger-reconcile (account &optional arg)
  (interactive "sAccount to reconcile: \nP")
  (let* ((buf (current-buffer))
	 (items
	  (with-temp-buffer
	    (let ((exit-code

      (insert
       (with-temp-buffer
	 (setq exit-code
	       (apply #'ledger-run-ledger
		      ledger-buf "entry"
		      (split-string
		       (with-temp-buffer
			 (insert entry-text)
			 (goto-char (point-min))
			 (while (re-search-forward "\\([&$]\\)" nil t)
			   (replace-match "\\\\\\1"))
			 (buffer-string)))))
	 (if (= 0 exit-code)
	     (if insert-year
		 (buffer-substring 2 (point-max))
	       (buffer-substring 7 (point-max)))
	   (concat (if insert-year entry-text
		     (substring entry-text 6)) "\n"))) "\n"))))

(defun ledger-delete-current-entry ()
  (interactive)
  (save-excursion
    (when (or (looking-at "^[0-9]")
	      (re-search-backward "^[0-9]" nil t))
      (let ((beg (point)))
	(while (not (eolp))
	  (forward-line))
	(delete-blank-lines)
	(delete-region beg (point))))))

(defun ledger-toggle-current ()
  (interactive)
