;;;; bbdb-stalin.el -- help purge unpersons ;;; started by John Sturdy, 2002-01-02 ;;; Time-stamp: <2002-08-11 14:54:56 jcgs> (provide 'bbdb-stalin) (require 'bbdb-iterators) (defvar bbdb-potential-unpersons nil "Working data for bbdb-stalin") (defun bbdb-stalin () "Display potential unpersons." (interactive) (setq bbdb-potential-unpersons nil) (bbdb:apply-to-records 'bbdb:collect-potential-unpersons) (bbdb-display-records bbdb-potential-unpersons)) (defun bbdb:collect-potential-unpersons (person) "Add PERSON to bbdb-potential-unpersons if they meet none of certain criteria." ;; (message "%s: %s, %S" (car (bbdb-record-net person)) (bbdb-record-company person) (bbdb-record-raw-notes record)) (let ((notes (bbdb-record-raw-notes record))) (when (and (or (null notes) (and (null (cdr notes)) (eq (caar notes) 'timestamp)) ) (null (bbdb-record-company person)) (not (catch 'found (dolist (address (bbdb-record-net person)) (if (string-match-any '("harlequin" "ugsolutions" "sanger" "cb1") address) (throw 'found t))) nil))) (push person bbdb-potential-unpersons)))) ;;; end of bbdb-stalin.el