+2013-07-26 Tassilo Horn <tsdh@gnu.org>
+
+ * gnus.texi (Sorting the Summary Buffer): Document new defcustom
+ `gnus-sort-threads-recursively'.
+
2013-07-25 Glenn Morris <rgm@gnu.org>
* Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add ido.
gnus-thread-sort-by-score))
@end lisp
+By default, threads are sorted recursively, that is, first the roots,
+then all subthreads, and so on. If you feel more like sorting only
+the roots, so that inside a thread the original chronological order is
+retained, you can set @code{gnus-sort-threads-recursively} to nil.
+
@vindex gnus-thread-score-function
The function in the @code{gnus-thread-score-function} variable (default
@code{+}) is used for calculating the total score of a thread. Useful
+2013-07-26 Tassilo Horn <tsdh@gnu.org>
+
+ * gnus-sum.el (gnus-sort-threads-recursively): New defcustom.
+ (gnus-sort-threads): Use it.
+
2013-07-25 Andreas Schwab <schwab@linux-m68k.org>
* gnus-art.el (gnus-button-url-regexp): Make it match url in which
(function :tag "other"))
(boolean :tag "Reverse order"))))
+(defcustom gnus-sort-threads-recursively t
+ "If non-nil, `gnus-thread-sort-functions' are applied recursively.
+Setting this to nil allows sorting high-score, recent,
+etc. threads to the top of the summary buffer while still
+retaining chronological old to new sorting order inside threads."
+ :group 'gnus-summary-sort
+ :type 'boolean)
(defcustom gnus-thread-sort-functions '(gnus-thread-sort-by-number)
"*List of functions used for sorting threads in the summary buffer.
(gnus-message 8 "Sorting threads...")
(prog1
(condition-case nil
- (let ((max-lisp-eval-depth (max max-lisp-eval-depth 5000)))
- (gnus-sort-threads-recursive
- threads (gnus-make-sort-function gnus-thread-sort-functions)))
+ (let ((max-lisp-eval-depth (max max-lisp-eval-depth 5000))
+ (sort-func (gnus-make-sort-function gnus-thread-sort-functions)))
+ (if gnus-sort-threads-recursively
+ (gnus-sort-threads-recursive threads sort-func)
+ (sort threads sort-func)))
;; Even after binding max-lisp-eval-depth, the recursive
;; sorter might fail for very long threads. In that case,
;; try using a (less well-tested) non-recursive sorter.