On Fri Feb 11 2011 Stefan Monnier wrote: > Indeed, we have a problem here, and I think that part of the problem is > on the side of bbdb-complete-name's behavior: it should include the name > (with quotes) along with the email address so that it is actually > a completion rather than a lookup. > > Of course, that won't fix it all, since the kind of completion it would > then offer would still not be "prefix completion", so you'd have to make > sure you use something like `substring' in completion-styles (and that > was not available in Emacs-23).
I am really not sure how BBDB email "completeion" could be squeezed into the usual emacs completion styles. Say, we are talking about the email address Joe Smith <f...@bar.org> Now the idea is that typing "foo" would give you the above line. Also, this command implements the concept of "cycling", which is yet more orthogonal to usual completion: If Joe Smith also has the email <sm...@baz.com> and you apply this command to the above (already expanded) email address, you can cycle through all (properly expanded) email addresses of Joe Smith. On the other hand, I am not sure whether it's worth the effort to try to use more sophisticated high-level functions for this problem. (Maybe my problem is that I do not know the latest GNU Emacs completion goodies I am missing without these high-level functions.) In any case, currently the most complicated part of bbdb-complete-mail calculates possible completions. But inserting them requires just three lines: (let ((completion-base-position (list beg end))) (with-output-to-temp-buffer "*Completions*" (display-completion-list dwim-completions))) which is already based on some more recent code for performing completions. Cheers, Roland ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ bbdb-info@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bbdb-info BBDB Home Page: http://bbdb.sourceforge.net/