On Thursday, May 4, 2006 at 12:17:42, Uwe Brauer wrote: [...] > The following works without trouble: > > John Doe <[EMAIL PROTECTED]> > > But only the simple email address causes the problems I described. > > [EMAIL PROTECTED] > > > Can please somebody confirm this?
Please try the attached patch which fixes this for me. Snarfing was done in the buffer " *BBDB snarf*" which was actually empty when entering the while loop you identified and thus the was noch char at point ... If it gets a +1 from Waider I try commit ;-) Robert
Index: lisp/bbdb-snarf.el =================================================================== RCS file: /cvsroot/bbdb/bbdb/lisp/bbdb-snarf.el,v retrieving revision 1.42 diff -u -r1.42 bbdb-snarf.el --- lisp/bbdb-snarf.el 28 Aug 2005 20:24:56 -0000 1.42 +++ lisp/bbdb-snarf.el 25 May 2006 22:48:58 -0000 @@ -203,11 +203,12 @@ ;; name (goto-char (point-min)) ;; This check is horribly english-centric (I think) - (while (/= (char-syntax (char-after (point))) ?w) + (while (and (not (eobp)) (/= (char-syntax (char-after (point))) ?w)) (forward-line 1)) - (re-search-forward "\\(\\sw\\|[ -\.,]\\)*\\sw" nil t) - (setq name (match-string 0)) - (delete-region (match-beginning 0) (match-end 0)) + (if (re-search-forward "\\(\\sw\\|[ -\.,]\\)*\\sw" nil t) + (progn + (setq name (match-string 0)) + (delete-region (match-beginning 0) (match-end 0)))) ;; address (goto-char (point-min)) @@ -281,6 +282,12 @@ ; "city: " city "\n" ; "state: " state "\n" ; "zip: " zip "\n") + + (if (not name) + (setq name (if nets + (car (car (bbdb-rfc822-addresses (car nets)))) + "?"))) + (bbdb-merge-interactively name nil nets