Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only add properties for prescient-sort-full-matches-first to the first candidate. #148

Merged
merged 1 commit into from
Jul 20, 2023

Commits on Jul 8, 2023

  1. Only add properties for prescient-sort-full-matches-first to the fi…

    …rst candidate.
    
    Only add properties to the first candidate, and search for the
    properties in the candidates list. This should be better than what we
    do now, which is to propertize every candidate and later get the
    properties from the first candidate in the list.
    
    For N candidates, the old way is always
    
        (propertize N) + (search 1) + (sort N)
    
    and the new way is
    
        (propertize 1) + (search (N - x)) + (sort N)
    
    where x is greater than or equal to 0. Assuming that
    `get-text-property` is no worse than `propertize` (which seems true in
    testing), the new way is never worse than the old way, and should
    usually be better.
    
    Add function `prescient--get-sort-info`, to complement
    `prescient--add-sort-info`.
    okamsn committed Jul 8, 2023
    Configuration menu
    Copy the full SHA
    6b7eda0 View commit details
    Browse the repository at this point in the history