 
 
 (defun ledger-schedule-list-upcoming-xacts (candidate-items early horizon)
-  "Search CANDIDATE-ITEMS for xacts that occur within the perios today - EARLY  to today + HORIZON"
+  "Search CANDIDATE-ITEMS for xacts that occur within the period today - EARLY  to today + HORIZON"
   (let ((start-date (time-subtract (current-time) (days-to-time early)))
 	test-date items)
     (loop for day from 0 to (+ early horizon) by 1 do

(defun ledger-schedule-is-holiday (date)
  "Return true if DATE is a holiday.")

(defun ledger-schedule-scan-transactions (auto-file)
  "Scans AUTO_FILE and returns a list of transactions with date predicates.
The car of each item is a fuction of date that returns true if
the transaction should be logged for that day."
  (interactive "fFile name: ")
  (let ((xact-list (list)))
    (with-current-buffer
	(find-file-noselect auto-file)
      (goto-char (point-min))
      (while (re-search-forward "^\\[\\(.*\\)\\] " nil t)
	(let ((date-descriptor "")


(defgroup ledger-schedule nil
  "Support for automatically recommendation transactions."
  :group 'ledger)

(defcustom ledger-schedule-buffer-name "*Ledger Schedule*"
  "Name for the schedule buffer"
  :type 'string
  :group 'ledger-schedule)

(defcustom ledger-schedule-look-backward 7
  "Number of days to look back in time for transactions."
  :type 'integer
  :group 'ledger-schedule)

(defcustom ledger-schedule-look-forward 14
  "Number of days auto look forward to recommend transactions"
  :type 'integer
  :group 'ledger-schedule)

(defcustom ledger-schedule-file "~/FinanceData/ledger-schedule.ledger"
  "File to find scheduled transactions."
  :type 'file
  :group 'ledger-schedule)

(defsubst between (val low high)
  (and (>= val low) (<= val high)))

