;; Hi, ;; I got this idea last night and tried it out. Emacs version 19 ;; has a forms mode which can be used to browse regularly ordered data. ;; ;; So, I wrote out an ascii cbb file, and used the ;; following to browse it. I haven't had time to play with it much but ;; browsing seems to work fine and I thought I'd show it to you. It is a ;; convenient tool when you are not at an X terminal. ;; ;; Just save the following in a file, change the path to your .cbb file ;; and then type M-x forms-mode. ;; ;; I'll work on it further so don't make it available just yet. ;; ;; Ravi ;; ;; Further directions: ;; ;; Have this file in your current emacs buffer and edit the line that ;; says "EDIT HERE". Then type Meta-x forms-mode. Emacs will ask if you ;; want to evaluate the current buffer contents. Type "yes". ;; ;; checking-form -- -*-emacs-lisp-*- ;; ;; EDIT HERE ;; set the transaction file (setq forms-file "/home/curt/Personal/Financial/cbb/TCF97.cbb") (setq forms-read-only t) ; to make buffer read-only at start (setq forms-field-sep "\t") ;; the cbb files are separated by : ;; (setq forms-number-of-fields 9) (setq forms-forms-scroll t) ;; use SPC to scroll to next record (setq forms-number-of-fields (forms-enumerate '(cbb-date cbb-checknum cbb-payee cbb-debit cbb-credit cbb-category cbb-memo cbb-status))) ;; The following functions are used by this form for layout purposes. ;; (defun arch-tocol (target &optional fill) "Produces a string to skip to column TARGET. Prepends newline if needed. The optional FILL should be a character, used to fill to the column." (if (null fill) (setq fill ? )) (if (< target (current-column)) (concat "\n" (make-string target fill)) (make-string (- target (current-column)) fill))) ;; (defun arch-rj (target field &optional fill) "Produces a string to skip to column TARGET minus the width of field FIELD. Prepends newline if needed. The optional FILL should be a character, used to fill to the column." (arch-tocol (- target (length (nth field forms-fields))) fill)) (setq forms-format-list (list "====== Visiting " forms-file " ======\n\n" '(arch-tocol 69 ?-) "\n" "Chk# Date Description Debit Credit\n" " Comment Category\n" '(arch-tocol 69 ?-) "\n\n" cbb-checknum '(arch-tocol 6) cbb-date '(arch-tocol 16) cbb-payee '(arch-tocol 55) cbb-debit '(arch-tocol 63) cbb-credit ; '(arch-rj 72 10) ; cbb-total ; "\n\n" '(arch-tocol 16) cbb-memo '(arch-tocol 36) cbb-category )) ;; jump to last record on starting up (setq forms-mode-hooks '(lambda() (forms-last-record) ))