>>>>> On 6 Jan 95, Roland McGrath (roland) wrote:

  roland> I must share the feeling!  I tried to gush about hitting 10000, but
  roland> it bounced off the defunct lucid.com, and it wasn't a palindrome
  roland> anyway!

Would you be willing to share some of your BBDB settings with the members of
the info-bbdb list?  If you are using BBDB in conjunction with your various
GNU mailing lists, you probably have quite a few fancy items; e.g., for
bbdb-auto-notes-alist.  I'd be interested in finding out how expert BBDB
users have set up their BBDB.

(I guess I should reciprocate and pass along my own settings -- I don't
consider myself to be an "expert BBDB" user by any means, but it seems rude
to inquire directly about someone else's and not offer anything in return
:-).  Below is what I use; many of these things were picked up from the net.
Two files are involved: some bootstrap code in ~/.emacs, and more
BBDB-specific stuff in ~/.emacs-bbdb.el.  Hope it's useful to someone.)

***** In ~/.emacs *********

(push (concat home "/Emacs/BBDB/") load-path)

(autoload 'bbdb                    "bbdb-com"  "BBDB" t)
(autoload 'bbdb-create             "bbdb-com"  "BBDB" t)
(autoload 'bbdb-complete-name      "bbdb-com"  "BBDB" t)
(autoload 'bbdb-name               "bbdb-com"  "BBDB" t)
(autoload 'bbdb-insinuate-vm       "bbdb-vm"   "Hook BBDB into VM")
(autoload 'bbdb-insinuate-sendmail "bbdb"      "Hook BBDB into sendmail")
(autoload 'bbdb-insinuate-gnus     "bbdb"      "Hook BBDB into GNUS")
(autoload 'bbdb-ftp                "bbdb-ftp"  "Ftp BBDB Package" t)
(autoload 'bbdb-create-ftp-site    "bbdb-ftp"  "Ftp BBDB Package" t)

(global-set-key "\C-x\C-d" (make-sparse-keymap))
(global-set-key "\C-x\C-d\t"   'bbdb-complete-name)
(global-set-key "\C-x\C-d\C-b" 'bbdb)
(global-set-key "\C-x\C-d\C-c" 'bbdb-create)
(global-set-key "\C-x\C-d\C-f" 'bbdb-ftp)
(global-set-key "\C-x\C-d\C-n" 'bbdb-name)
(global-set-key "\C-x\C-d\C-s" 'bbdb-create-ftp-site)

;; Hook BBDB into send-mail-mode.  More settings are in ~/.emacs-vm.el.

(add-hook 'mail-setup-hook   'bbdb-insinuate-sendmail)
(add-hook 'mail-setup-hook   'bbdb-define-all-aliases)
(add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)

;; My customizations to BBDB are in ~/.emacs-bbdb.el.

(add-hook 'bbdb-load-hook
          (function
           (lambda () 
            (load-file (expand-file-name "~/.emacs-bbdb.elc")))))


***** In ~/.emacs-bbdb.el *********

;;;; -*- Mode: Emacs-Lisp -*-
;;;;
;;;; Description       : Customizations for Emacs BBDB
;;;; Original author(s): Michael Hucka <[EMAIL PROTECTED]>
;;;; Organization      : University of Michigan EECS, Ann Arbor, Mich., USA
;;;; 

(eval-when-compile
  (require 'bbdb)
  (require 'bbdb-com)
  ;; Additions not provided as part of BBDB:
  (require 'bbdb-query))

(require 'mailabbrev)

(autoload 'bbdb-query      "bbdb-query"  "BBDB" t)
(autoload 'bbdb-append     "bbdb-query"  "BBDB" t)
(autoload 'bbdb-flush      "bbdb-query"  "BBDB" t)
(autoload 'bbdb-keep       "bbdb-query"  "BBDB" t)

;;;----------------------------------------------------------------------------
;;; Misc. additions from random sources
;;;----------------------------------------------------------------------------

;; Originally:
;; From: [EMAIL PROTECTED] (Roland McGrath)
;; To: Ministry of Bugs <[EMAIL PROTECTED]>
;; Subject: useful hook
;; Date: Mon, 27 Jul 92 15:28:54 -0400
;;
;; Makes an alias take effect when you add it.
;; This has some fixes I added for compatibility with FSF 19's mailabbrev.el.

(add-hook 'bbdb-change-hook
          (function
           (lambda (record)
             (let ((alias (bbdb-record-getprop record 'mail-alias))
                   (abbrevs (if (boundp 'mail-abbrevs)
                                mail-abbrevs
                              mail-aliases)))
               (and alias
                    (mapcar (function
                             (lambda (alias)
                               (or (if (vectorp abbrevs)
                                       (intern-soft alias abbrevs)
                                     (assoc alias abbrevs))
                                   (define-mail-alias alias
                                     (bbdb-dwim-net-address record)))))
                            (bbdb-split alias ",")))))))

;;;----------------------------------------------------------------------------
;;; Variable settings and other customizations.
;;;----------------------------------------------------------------------------

(setq bbdb-file                       "~/Personal/bbdb"
      bbdb-user-mail-names            "hucka@.*\\.umich\\.edu"
      bbdb-use-pop-up                  (> (screen-height) 24)
      bbdb-electric-p                  t
      bbdb-auto-revert-p               t
      bbdb-notice-auto-save-file       t
      bbdb-offer-save                  'auto
      bbdb-pop-up-target-lines         6
      bbdb-default-area-code           313
      bbdb-send-mail-style             'vm
      bbdb-completion-type             'primary-or-name
      bbdb-completion-display-record   nil
      bbdb-always-add-addresses        t
      bbdb-new-nets-always-primary     t
      bbdb-quiet-about-name-mismatches nil
      bbdb/mail-auto-create-p          nil
      bbdb/news-auto-create-p          nil
      bbdb-auto-notes-alist
      (list
       (list "x-face"
             (list (concat "[ \t\n]*\\([^ \t\n]*\\)"
                           "\\([ \t\n]+\\([^ \t\n]+\\)\\)?"
                           "\\([ \t\n]+\\([^ \t\n]+\\)\\)?"
                           "\\([ \t\n]+\\([^ \t\n]+\\)\\)?"
                           )
                   'face
                   "\\1\\3\\5\\7"))
       ;; This grabs the "Organization" header & updates the company slot.
       '("Organization"
         (".*" company 0))
       '("Newsgroups"
         ("[^,]+" newsgroups 0))
       '("Subject"
         (".*" last-subj 0 t))
       '("To"
         ("sde" mailing-lists "SDE")
         ("soar" mailing-lists "soar")
         ("live-eye" mailing-lists "live-eye")
         ("info-bbdb" mailing-lists  "info-bbdb")
         ("gnu-emacs-faq" mailing-lists "emacs-faq")
         ("[EMAIL PROTECTED]" mailing-lists "emacs-faq")
         ("machten@tenon" mailing-lists "machten")
         ("beta-list@tenon" mailing-lists "machten")
         ("connectionists" mailing-lists "connectionists"))
       '("Cc"
         ("sde" mailing-lists "SDE")
         ("soar" mailing-lists "soar")
         ("live-eye" mailing-lists "live-eye")
         ("info-bbdb" mailing-lists  "info-bbdb")
         ("gnu-emacs-faq" mailing-lists "emacs-faq")
         ("[EMAIL PROTECTED]" mailing-lists "emacs-faq")
         ("machten@tenon" mailing-lists "machten")
         ("beta-list@tenon" mailing-lists "machten")
         ("connectionists" mailing-lists "connectionists")))
      bbdb-auto-notes-ignore
      (list
       '("Organization" . "^Gatewayed from\\|^Source only\\|GNUs Not Usenet\\|GNU's 
Not UNIX\\|The Internet")))

;; Hooks for automatic actions.

(add-hook 'bbdb-notice-hook 'bbdb-auto-notes-hook)
(add-hook 'bbdb-change-hook 'bbdb-timestamp-hook)

;; Separators for entries in certain fields

(put 'mailing-lists 'field-separator ", ")
(put 'newsgroups    'field-separator ", ")

;; Key rebindings.

(define-key bbdb-mode-map "a" 'bbdb-append)
(define-key bbdb-mode-map "b" 'bbdb)
(define-key bbdb-mode-map "c" 'bbdb-create)
(define-key bbdb-mode-map "u" 'bbdb-query)
(define-key bbdb-mode-map "l" 'bbdb-flush)
(define-key bbdb-mode-map "k" 'bbdb-keep)

Reply via email to