TZ> Maybe accept the score as a property to the candidate strings and use
TZ> that property, if it exists, instead of the string length?
TZ> That would side-step the current completion mechanism nicely, requiring
TZ> little extra code except in the final sort of candidates.  If the
TZ> strings aren't mangled by the completion mechanism, of course--but I
TZ> don't think they are after a quick scan.

That would work.  It's a quick&simple solution (i.e. generally a good
sign), but it has one drawback: the properties will be often added
without being used, since the list of completions is used not only to
build the *Completions* buffer or to cycle through completions but also
to do TAB completion (often just handled by try-completion, but with
substring completion it instead needs to get the all-completions list
and then weed it out).

So it has a performance downside (which means, it's not the last word in
this respect), but I'd probably accept a patch to add such a feature to
minibuffer.el since the performance impact is only incurred by
completion tables that really use the feature and it's unlikely to be
a serious maintenance problem in the future.


        Stefan


------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to