   :group 'ledger)
 
 (defcustom ledger-recon-buffer-name "*Reconcile*"
-  "Name to use for reconciliation window."
+  "Name to use for reconciliation buffer."
   :group 'ledger-reconcile)
 
 (defcustom ledger-narrow-on-reconcile t

				(ledger-reconcile-format-posting beg
																				 where
																				 fmt
																				 (format-time-string date-format (nth 2 xact))  ; date
																				 (if (nth 3 xact) (nth 3 xact) "")  ; code
																				 (nth 3 posting)  ; status
																				 (nth 4 xact)  ; payee
																				 (nth 1 posting)  ; account
																				 (nth 2 posting))))))  ; amount

(defun ledger-do-reconcile (&optional sort)
  "SORT the uncleared transactions in the account and display them in the *Reconcile* buffer.

  "If t, prompt for effective date when clearing transactions during reconciliation."
  :type 'boolean
  :group 'ledger-reconcile)

;; s-functions below are copied from Magnars' s.el
;; prefix ledger-reconcile- is added to not conflict with s.el
(defun ledger-reconcile-s-pad-left (len padding s)
  "If S is shorter than LEN, pad it with PADDING on the left."
  (let ((extra (max 0 (- len (length s)))))
    (concat (make-string extra (string-to-char padding))
	    s)))
(defun ledger-reconcile-s-pad-right (len padding s)
  "If S is shorter than LEN, pad it with PADDING on the right."
  (let ((extra (max 0 (- len (length s)))))
    (concat s
	    (make-string extra (string-to-char padding)))))
(defun ledger-reconcile-s-left (len s)
  "Return up to the LEN first chars of S."
  (if (> (length s) len)
      (substring s 0 len)
    s))
(defun ledger-reconcile-s-right (len s)
  "Return up to the LEN last chars of S."
  (let ((l (length s)))
    (if (> l len)
	(substring s (- l len) l)
      s)))

(defun ledger-reconcile-truncate-right (str len)
  "Truncate STR right side with max LEN characters, and pad with '…' if truncated."
  (if (and (>= len 0) (> (length str) len))
      (ledger-reconcile-s-pad-right len "…" (ledger-reconcile-s-left (- len 1) str))
    str))

(defun ledger-reconcile-truncate-left (str len)
  "Truncate STR left side with max LEN characters, and pad with '…' if truncated."
  (if (and (>= len 0) (> (length str) len))
      (ledger-reconcile-s-pad-left len "…" (ledger-reconcile-s-right (- len 1) str))
    str))

(defun ledger-reconcile-get-cleared-or-pending-balance (buffer account)
  "Use BUFFER to Calculate the cleared or pending balance of the ACCOUNT."
