Proposed New sort API

William Casarin jb55 at jb55.com
Sun Dec 10 11:37:49 PST 2017


David Bremner <david at tethera.net> writes:

> I started looking at William's sorting patches [1], but the
> proliferation of sorting options bugged me a bit. I decided to sketch
> out a new more flexible API.
>
> In the new API, there is is a sort "key", currently mapped one-to-one
> to value slots, but potentially could do more sophisticated things
> like making keys up dynamically (e.g. preprocessing subjects).
>
> The second parameter is a sort "type". Currently this is just
> ascending or descending, but other potential options include
> sort_by_relevance_then_value

This is great, this is what I was thinking about as well. I'll try
refactoring my sorting branch on top of these changes.

-- 
https://jb55.com


More information about the notmuch mailing list