<<< Date Index >>>     <<< Thread Index >>>

Re: [PATCH] Sort the 'Incoming' buffy list



Hi,

* Jan Larres wrote:

# HG changeset patch
# User Jan Larres <jan@xxxxxxxxxxxxxx>
# Date 1238600385 -7200
# Branch buffysort
# Node ID 102051634e013818d31d36f6d83542e0d4422619
# Parent  8205a12329d395b87eeb890cb86d28e761e83992
Sort the 'Incoming' buffy list

Sort the 'Incoming' buffy list with regard to the sort_browser option.
Sorting by date and size is unfortunately not possible since this data is
not present in the buffy structure, but alpha (and unsorted of course)
works fine.
This is primarily useful for the sidebar patch since it displays the
mailboxes in the 'Incoming' list order, but it doesn't depend on the
sidebar at all and might be useful in other cases, too.

The patch is not quite correct, I'd say. First, sort_browser can
change. What if it changed after the list got sorted already? Second,
sorting is mutt_find_mailbox() is wrong as that's part of the
$check_mbox_size option (which must be set, and even then works for
mbox/mmdf only).

The way to "correctly" implement sort_browser for the sidebar IMHO is to
maintain a second list for it. Hooking into the parse routine
mutt_parse_mailboxes() and parse_set() you get told about new mailboxes
and sort_browser changes.

For vanilla mutt I think sorting Incoming doesn't make sense as the list
is only presented through sort_browser only (except maybe for buffy
cycling).

Rocco