   (ledger-auto-compile-constraints 
    (ledger-auto-split-constraints descriptor)))
 
+
+
+;;
+;;  Test harnesses for use in ielm
+;;
+(defvar auto-items)
+
+(defun ledger-auto-test-setup ()
+  (setq auto-items 
+	(ledger-auto-scan-transactions "~/FinanceData/ledger-auto.ledger")))
+
+
+(defun ledger-auto-test-predict ()
+  (let ((today (current-time))
+	test-date)
+    
+    (loop for day from 0 to ledger-auto-look-forward by 1 do
+	 (setq test-date (time-add today (days-to-time day)))
+	 (message "date: %S" (decode-time test-date)))))
+
 (provide 'ldg-auto)
 
 ;;; ldg-auto.el ends here

;; use (fset 'VARNAME (macro args)) to put the macro definition in the
;; function slot of the symbol VARNAME.  Then use VARNAME as the
;; function without have to use funcall.

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

		(push newcar result)
		(push (ledger-auto-parse-date-descriptor newcar) result)) )
	  (setq tree (cdr tree)))

	;; tie up all the clauses in a big or and lambda
	`(lambda (date) 
	   ,(nconc (list 'or) (nreverse result) tree)))))

