I don't know if this is what you meant, but I use mail aliases. Then I can search for an alias to get a list that is from a particular category (for example Christmas cards, or members of a project team).
The simple method is (bbdb-notes "mail-alias" "ALIAS YOU ARE LOOKING FOR" nil). The stuff below is window dressing to help looking through the alias list and to add this method to the key map. The "mj" on everything are my initials. No warranties or claims that this is the best way. The alias completer relies on the current format of mail aliases, so it might break in the future. Matt ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; search by mail aliases ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;###autoload (defun mj-bbdb-mail-alias-list () "Return an unsorted list of the mail aliases currently in BBDB." (interactive) (let ((l nil)) ;; Pull out all of the aliases. (dolist (record (bbdb-records)) (when (assoc 'mail-alias (bbdb-record-raw-notes record)) (add-to-list 'l (cdr (assoc 'mail-alias (bbdb-record-raw-notes record)))))) ;; This list has some comma-separated values. Convert them into ;; individual entries, deleting the combinations. (dolist (record l) (let ((split (split-string record ", "))) (when (not (eq (length split) 1)) (dolist (s split) (add-to-list 'l s)) (delq record l)))) l)) ;;;###autoload (defun mj-bbdb-read-alias () "Perform `completing-read' to return one existing mail alias." (interactive "P") (let ((aliases nil)) (dolist (alias (mj-bbdb-mail-alias-list)) (add-to-list 'aliases (cons alias alias))) (completing-read "Mail alias: " aliases))) ;;;###autoload (defun mj-bbdb-mail-aliases (string) "Display all entries in the BBDB matching the regexp STRING in the mail-alias. Elides the output. Output is inverted if `bbdb-search-invert-p' is true \(usually after a `!' prefix). An interactive call uses `completing-read' with existing aliases." (interactive (list (mj-bbdb-read-alias))) (bbdb-notes "mail-alias" string nil)) (define-key bbdb-mode-search-map [(m)] 'mj-bbdb-mail-aliases) > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Leo > Sent: Monday, September 10, 2007 1:36 AM > To: bbdb-info@lists.sourceforge.net > Subject: Categorize contacts > > Hi there, > > My contacts have grown to 400 and I wonder if there is any way to > categorize them in BBDB. Thanks in advance. > > -- > .: Leo :. [ sdl.web AT gmail.com ] .: [ GPG Key: 9283AA3F ] :. > > => "(require 'cl) considered harmful" considered harmful > => http://dto.freeshell.org/blog/blog-2007-09-07-2323.html > > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > bbdb-info@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bbdb-info > BBDB Home Page: http://bbdb.sourceforge.net/ > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/