> * Roland Winkler <jvax...@tah.bet> [2012-07-17 17:06:52 -0500]: > > On Tue Jul 17 2012 Sam Steingold wrote: >> I thought that bbdb-canonicalize-mail-function would do the job by >> returning nil or "" for bad e-mail addresses, and it worked for quite >> some time (it returned nil). > > Use a return value of nil to ignore a mail address. I cannot > promise, though, that I already identified all instances in the code > where this can be relevant.
Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil) bbdb-message-search("Alex" nil) gnus-user-format-function-b([47052 "Common Lisp or Scheme" "Alex <muzikman...@dontwantspam.com>" "Fri, 20 Jul 2012 02:11:02 +0000 (UTC)" "<juaenl$2kmt$1...@adenine.netfront.net>" "" 1958 28 "mx04.eternal-september.org comp.lang.lisp:47052" nil]) (format "%c%4s: %s%-20s %s%c" gnus-tmp-opening-bracket gnus-tmp-lines (gnus-user-format-function-b gnus-tmp-header) (let* ((val (eval (let ((val ...)) (if (> ... 20) (if ... ... ...) val)))) (need (- 20 (string-width val)))) (if (> need 0) (concat nil val (make-string need 32)) val)) (gnus-date-iso8601 (mail-header-date gnus-tmp-header)) gnus-tmp-closing-bracket) may I commit this? --8<---------------cut here---------------start------------->8--- diff --git a/lisp/bbdb-com.el b/lisp/bbdb-com.el index 282b2b8..f37d4d0 100644 --- a/lisp/bbdb-com.el +++ b/lisp/bbdb-com.el @@ -590,9 +590,10 @@ This function performs a fast search using `bbdb-hashtable'. NAME and MAIL must be strings. See `bbdb-search' for searching records with regexps." (bbdb-buffer) ; make sure database is loaded and up-to-date - (setq mail (downcase mail)) + (when mail + (setq mail (downcase mail))) ;; (1) records matching NAME and MAIL - (or (and name + (or (and name mail (let (records) (dolist (record (bbdb-gethash name '(fl-name lf-name aka))) (dolist (m (bbdb-record-mail record)) --8<---------------cut here---------------end--------------->8--- -- Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000 http://www.childpsy.net/ http://dhimmi.com http://ffii.org http://memri.org http://honestreporting.com http://www.memritv.org http://thereligionofpeace.com In the race between idiot-proof software and idiots, the idiots are winning. ------------------------------------------------------------------------------ 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/