Variable: gnus-article-sort-functions

gnus-article-sort-functions is a customizable variable defined in gnus-sum.el.gz.

Value

(gnus-article-sort-by-number)

Documentation

List of functions used for sorting articles in the summary buffer.

Each function takes two articles and returns non-nil if the first article should be sorted before the other. If you use more than one function, the primary sort function should be the last. You should probably always include gnus-article-sort-by-number in the list of sorting functions -- preferably first. Also note that sorting by date is often much slower than sorting by number, and the sorting order is very similar. (Sorting by date means sorting by the time the message was sent, sorting by number means sorting by arrival time.)

Each item can also be a list (not F) where F is a function; this reverses the sort order.

Ready-made functions include gnus-article-sort-by-number, gnus-article-sort-by-author, gnus-article-sort-by-subject, gnus-article-sort-by-date, gnus-article-sort-by-score, gnus-article-sort-by-rsv, gnus-article-sort-by-newsgroups, and gnus-article-sort-by-random.

When threading is turned on, the variable gnus-thread-sort-functions controls how articles are sorted.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defcustom gnus-article-sort-functions '(gnus-article-sort-by-number)
  "List of functions used for sorting articles in the summary buffer.

Each function takes two articles and returns non-nil if the first
article should be sorted before the other.  If you use more than one
function, the primary sort function should be the last.  You should
probably always include `gnus-article-sort-by-number' in the list of
sorting functions -- preferably first.  Also note that sorting by date
is often much slower than sorting by number, and the sorting order is
very similar.  (Sorting by date means sorting by the time the message
was sent, sorting by number means sorting by arrival time.)

Each item can also be a list `(not F)' where F is a function;
this reverses the sort order.

Ready-made functions include `gnus-article-sort-by-number',
`gnus-article-sort-by-author', `gnus-article-sort-by-subject',
`gnus-article-sort-by-date', `gnus-article-sort-by-score',
`gnus-article-sort-by-rsv', `gnus-article-sort-by-newsgroups',
and `gnus-article-sort-by-random'.

When threading is turned on, the variable `gnus-thread-sort-functions'
controls how articles are sorted."
  :group 'gnus-summary-sort
  :type '(repeat (gnus-widget-reversible
                  (choice (function-item gnus-article-sort-by-number)
                          (function-item gnus-article-sort-by-author)
                          (function-item gnus-article-sort-by-subject)
                          (function-item gnus-article-sort-by-date)
                          (function-item gnus-article-sort-by-score)
                          (function-item gnus-article-sort-by-rsv)
                          (function-item gnus-article-sort-by-newsgroups)
                          (function-item gnus-article-sort-by-random)
                          (function :tag "other"))
                  (boolean :tag "Reverse order"))))