Gnus Manual. Node: Sorting Groups

## 2.12: Sorting Groups

The C-c C-s (gnus-group-sort-groups) command sorts the group buffer according to the function(s) given by the gnus-group-sort-function variable. Available sorting functions include:

 gnus-group-sort-by-alphabet Sort the group names alphabetically. This is the default. gnus-group-sort-by-real-name Sort the group alphabetically on the real (unprefixed) group names. gnus-group-sort-by-level Sort by group level. gnus-group-sort-by-score Sort by group score. See Group Score. gnus-group-sort-by-rank Sort by group score and then the group level. The level and the score are, when taken together, the group's rank. See Group Score. gnus-group-sort-by-unread Sort by number of unread articles. gnus-group-sort-by-method Sort alphabetically on the select method.

gnus-group-sort-function can also be a list of sorting functions. In that case, the most significant sort key function must be the last one.

There are also a number of commands for sorting directly according to some sorting criteria:

 G S a Sort the group buffer alphabetically by group name (gnus-group-sort-groups-by-alphabet). G S u Sort the group buffer by the number of unread articles (gnus-group-sort-groups-by-unread). G S l Sort the group buffer by group level (gnus-group-sort-groups-by-level). G S v Sort the group buffer by group score (gnus-group-sort-groups-by-score). See Group Score. G S r Sort the group buffer by group rank (gnus-group-sort-groups-by-rank). See Group Score. G S m Sort the group buffer alphabetically by backend name (gnus-group-sort-groups-by-method).

When given a prefix, all these commands will sort in reverse order.

You can also sort a subset of the groups:

 G P a Sort the process/prefixed groups in the group buffer alphabetically by group name (gnus-group-sort-selected-groups-by-alphabet). G P u Sort the process/prefixed groups in the group buffer by the number of unread articles (gnus-group-sort-selected-groups-by-unread). G P l Sort the process/prefixed groups in the group buffer by group level (gnus-group-sort-selected-groups-by-level). G P v Sort the process/prefixed groups in the group buffer by group score (gnus-group-sort-selected-groups-by-score). See Group Score. G P r Sort the process/prefixed groups in the group buffer by group rank (gnus-group-sort-selected-groups-by-rank). See Group Score. G P m Sort the process/prefixed groups in the group buffer alphabetically by backend name (gnus-group-sort-selected-groups-by-method).
Listing Groups The Group Buffer Group Maintenance