Three hours ago, Sam Tobin-Hochstadt wrote: > On Tue, May 29, 2012 at 7:33 AM, Eli Barzilay <e...@barzilay.org> wrote: > > Just now, Sam Tobin-Hochstadt wrote: > >> I think you probably want to rank/divide '1' here based on how > >> much of the identifier is matched by the search. For example, if > >> you search for 'current-sep-line', you probably want > >> 'current-line-sep' first, but currently you get > >> 'current-alist-line-sep' first. > [...] > > Getting away from the discussion on sorting speed, I don't think my > suggestion even requires sorting: just add a 1.5 for > match-all-subword-parts-to-whole-id.
That won't work, since "current-line-sep" will have the all-subword match for both entries. The first one is whatever comes first in the alphabetically sorted index. You can see the same problem with a search for "current sep line". -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! _________________________ Racket Developers list: http://lists.racket-lang.org/dev