I have "John Smith <...>" in bbdb, but he sometimes sends mail as "John <...>" and then bbdb asks me to change his name to "John" (wrong) or to add "John" as an AKA (stupid).
Solution: --8<---------------cut here---------------start------------->8--- 2012-08-21 Sam Steingold <s...@gnu.org> * bbdb-mua.el (bbdb-annotate-message): relax name matching diff --git a/lisp/bbdb-mua.el b/lisp/bbdb-mua.el index 7f8e858..0711366 100644 --- a/lisp/bbdb-mua.el +++ b/lisp/bbdb-mua.el @@ -391,6 +391,8 @@ Return the records matching ADDRESS or nil." (cond ((or bbdb-read-only (not name) ;; Name equals the name of the record (bbdb-string= name old-name) ; redundant... + (bbdb-string= name (bbdb-record-firstname record)) + (bbdb-string= name (bbdb-record-lastname record)) (and (equal fname (bbdb-record-firstname record)) ; possibly (equal lname (bbdb-record-lastname record))) ; nil ;; Name equals an AKA of the record --8<---------------cut here---------------end--------------->8--- Alternatively, create a user option variable, containing a list of comparison functions which are called on name and record until one of them returns non-nil, initial value of which would be (list (lambda (name record) (bbdb-string= name (bbdb-record-name record))) (lambda (name record) (bbdb-string= name (bbdb-record-firstname record))) (lambda (name record) (bbdb-string= name (bbdb-record-lastname record))) (lambda (name record) (let ((fullname (bbdb-divide-name name))) (and (equal (cdr fullname) (bbdb-record-firstname record)) (equal (car fullname) (bbdb-record-lastname record))))) (lambda (name record) (member-ignore-case name (bbdb-record-aka record)))) -- Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000 http://www.childpsy.net/ http://memri.org http://thereligionofpeace.com http://camera.org http://americancensorship.org http://www.memritv.org If a woman is listening to a you without interrupting, do not wake her up! ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/