[mcclim-devel] patch for possbility sorting

rpgoldman at real-time.com rpgoldman at real-time.com
Fri Apr 7 19:30:35 UTC 2006


>>>>> "PA" == Paolo Amoroso <amoroso at mclink.it> writes:

    PA> rpgoldman at real-time.com writes:
    >> In BEIRC, one can end up with an enormously long list of
    >> candidate possibilities for completing a command, because IRC
    >> has so many commands.  The possibilities are not ordered at
    >> all, so the list is pretty much useless.
    >>
    >> The following patch to input-editing would fix this problem by
    >> sorting the set of possibilities alphabetically.

    PA> I deal with this by providing functions such as
    PA> COMPLETE-FROM-POSSIBILITIES with presorted lists of
    PA> possibilities.

OK.  The alternative solution would involve modifying the ACCEPT presentation
method for COMMAND-NAME in commands.lisp.  The problem is that this
would now involve a bunch of consing, because I'd have to enumerate
all the commands, sort them, and then call the suggester on them.  But
perhaps that's a better choice.  

Follow-up question:  This is being done by complete-from-generator,
rather than complete-from-possibilities.  So I don't explicitly create
the list of possibilities; instead I have a loop that does a bunch of
calls to SUGGEST.

A skim of the spec doesn't seem to show any guarantee that the
possibilities you get will appear in the same order they were added by
suggest.  So does your solution work in this location?

Note that this patch (I believe) only applies to
complete-from-generator, which doesn't have an obvoiusly good
alternative (unless we have the suggest guarantee I refer to above).

Any suggestions?

thanks,
r



More information about the mcclim-devel mailing list