Hello, Using CVS Emacs and CVS BBDB I have encountered the bug wherein bbdb-complete-name does not show all of the possible completions. For example, when writing a mail if I type "s" and press M-TAB only two names are shown in the completions buffer, despite having many more names starting with "S" in my database.
I believe this bug is caused by a change of behaviour of the Emacs function try-completion since version 21. Previously (in version 21), try-completion would run the predicate (its third argument) on every value in the obarray that was passed to try-completion. It appears that in CVS Emacs it will not look at *all* the values if it can determine the return value of try-completion earlier, without examining all of the values. This was causing bbdb-complete-name to show only some of the possible completions. I think the right solution for BBDB is to call all-completions to get a list of all the completions. I have changed bbdb-complete-name on my system and it seems to work better. I make no claim that this is the best way to fix the problem; I'm not familiar enough with the BBDB source to say either way. The patch against CVS is below. --- bbdb-com.el.~1.173.~ 2005-08-29 06:24:56.000000000 +1000 +++ bbdb-com.el 2006-01-05 16:34:11.000000000 +1100 @@ -2337,7 +2337,7 @@ (setq only-one-p nil)) (if (not (memq sym all-the-completions)) (setq all-the-completions (cons sym all-the-completions)))))) - (completion (try-completion pattern ht pred)) + (completion (progn (all-completions pattern ht pred) (try-completion pattern ht))) (exact-match (eq completion t))) (cond @@ -2505,7 +2505,7 @@ (not (string= completion last)) (setq last completion pattern (downcase orig) - completion (try-completion pattern ht pred))) + completion (progn (all-completions pattern ht pred) (try-completion pattern ht)))) (if (stringp completion) (progn (delete-region beg end) (insert completion)))) ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/