The following defun in bbdb-sc.el seems buggy:

(defun bbdb/sc-consult-attr (from)
  "Extract citing information from BBDB using sc-consult where
FROM is user e-mail address to look for in BBDB."
    ;; if logged in user sent this, use recipients.
    (let ((check (if (or (null from)
             (string-match (bbdb-user-mail-names) from))
             (car (cdr (mail-extract-address-components
                (or (sc-mail-field "to") from))))
           from)))
      (if from
      (let ((record (bbdb-search-simple nil from)))
        (and record (bbdb-record-getprop record bbdb/sc-attribution-field))))))


If you look at the call to STRING-MATCH, the first argument is
supposed to be a REGEXP and the second a STRING.  But
(bbdb-user-mail-names) returns a LIST.

I rewrote this function to the following, which seems to work (but
which necessitates (require 'cl):

(defun bbdb/sc-consult-attr (from)
  "Extract citing information from BBDB using sc-consult where
FROM is user e-mail address to look for in BBDB."
  ;; if logged in user sent this, use recipients.
  (let ((check (if (or (null from)
                       (find-if #'(lambda (x)
                                    (string-match from x))
                                (bbdb-user-mail-names)))
                   (car (cdr (mail-extract-address-components
                              (or (sc-mail-field "to") from))))
                   from)))
    (if from
        (let ((record (bbdb-search-simple nil from)))
          (and record (bbdb-record-getprop record bbdb/sc-attribution-field))))))

I suppose a vanilla elisp function could be found, instead.

For me, the above caused xemacs to cough up a hairball.  Not sure HOW
this works for anyone else.  Is anyone still using BBDB+Supercite?

R


-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to