summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ledger-reconcile.el31
-rw-r--r--lisp/ledger-state.el6
2 files changed, 21 insertions, 16 deletions
diff --git a/lisp/ledger-reconcile.el b/lisp/ledger-reconcile.el
index bdd530d2..61de0855 100644
--- a/lisp/ledger-reconcile.el
+++ b/lisp/ledger-reconcile.el
@@ -205,7 +205,8 @@ Return the number of uncleared xacts found."
(let ((inhibit-read-only t))
(goto-char (line-beginning-position))
(delete-region (point) (1+ (line-end-position)))
- (set-buffer-modified-p t)))))
+ (set-buffer-modified-p t))
+ (ledger-reconcile-refresh))))
(defun ledger-reconcile-visit (&optional come-back)
"Recenter ledger buffer on transaction and COME-BACK if non-nil."
@@ -321,23 +322,25 @@ POSTING is used in `ledger-clear-whole-transactions' is nil."
(dolist (posting (nthcdr 5 xact))
(let ((beg (point))
(where (ledger-marker-where-xact-is xact posting)))
- (insert (format "%s %-4s %-30s %-30s %15s\n"
+ (insert (format "%s %-4s %-50s %-30s %15s\n"
(format-time-string date-format (nth 2 xact))
- (if (nth 3 xact)
- (nth 3 xact)
- "")
- (nth 4 xact) (nth 1 posting) (nth 2 posting)))
+ (if (nth 3 xact)
+ (nth 3 xact)
+ "")
+ (truncate-string-to-width
+ (nth 4 xact) 49)
+ (nth 1 posting) (nth 2 posting)))
(if (nth 3 posting)
(if (eq (nth 3 posting) 'pending)
- (set-text-properties beg (1- (point))
- (list 'face 'ledger-font-reconciler-pending-face
- 'where where))
- (set-text-properties beg (1- (point))
- (list 'face 'ledger-font-reconciler-cleared-face
- 'where where)))
+ (set-text-properties beg (1- (point))
+ (list 'face 'ledger-font-reconciler-pending-face
+ 'where where))
+ (set-text-properties beg (1- (point))
+ (list 'face 'ledger-font-reconciler-cleared-face
+ 'where where)))
(set-text-properties beg (1- (point))
- (list 'face 'ledger-font-reconciler-uncleared-face
- 'where where)))) ))
+ (list 'face 'ledger-font-reconciler-uncleared-face
+ 'where where)))) ))
(goto-char (point-max))
(delete-char -1)) ;gets rid of the extra line feed at the bottom of the list
(if ledger-success
diff --git a/lisp/ledger-state.el b/lisp/ledger-state.el
index fffaab14..4f72f1a4 100644
--- a/lisp/ledger-state.el
+++ b/lisp/ledger-state.el
@@ -84,7 +84,8 @@ dropped."
(save-excursion ;; this excursion checks state of entire
;; transaction and unclears if marked
(goto-char (car bounds)) ;; beginning of xact
- (skip-chars-forward "0-9./=\\- \t") ;; skip the date
+ (skip-chars-forward "0-9./=\\-") ;; skip the date
+ (skip-chars-forward " \t") ;; skip the white space after the date
(setq cur-status (and (member (char-after) '(?\* ?\!))
(ledger-state-from-char (char-after))))
;;if cur-status if !, or * then delete the marker
@@ -183,7 +184,8 @@ dropped."
(insert (make-string width ? ))))))
(forward-line))
(goto-char (car bounds))
- (skip-chars-forward "0-9./=\\- \t")
+ (skip-chars-forward "0-9./=\\-") ;; Skip the date
+ (skip-chars-forward " \t") ;; Skip the white space
(insert (ledger-char-from-state state) " ")
(setq new-status state)
(if (re-search-forward "\\(\t\\| [ \t]\\)"