Here's another item you might want to know about someone... their WWW
home page.  Put that information in a field called "www", and this
function will provide the connection to the wonderful emacs w3-mode
(ie, hit W to go to the page, or *W to visit several at once).

Bng

(define-key bbdb-mode-map "W" 'bbdb-www)

(defun bbdb-www (all)
  "Visit URL's stored in `www' fields of the current record.
\\[bbdb-apply-next-command-to-all-records]\\[bbdb-www] \
means to try all records currently visible.
Non-interactively, do all records if arg is nonnil."
  (interactive (list (bbdb-do-all-records-p)))
  (let ((urls (mapcar '(lambda (r) (bbdb-record-getprop r 'www))
                      (if all 
                          (mapcar 'car bbdb-records)
                        (list (bbdb-current-record)))))
        (got-one nil))
    (while urls
      (if (car urls)
          (w3-fetch (setq got-one (car urls))))
      (setq urls (cdr urls)))
    (if (not got-one)
        (error "No WWW field!"))))


Reply via email to