[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113562: Gnus: Add option to sort threads non-recurs
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] trunk r113562: Gnus: Add option to sort threads non-recursively |
Date: |
Fri, 26 Jul 2013 22:25:10 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113562
revision-id: address@hidden
parent: address@hidden
author: Tassilo Horn <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Fri 2013-07-26 22:24:33 +0000
message:
Gnus: Add option to sort threads non-recursively
gnus-sum.el (gnus-sort-threads-recursively): New defcustom.
(gnus-sort-threads): Use it.
gnus.texi (Sorting the Summary Buffer): Document new defcustom
`gnus-sort-threads-recursively'.
modified:
doc/misc/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-6331
doc/misc/gnus.texi gnus.texi-20091113204419-o5vbwnq5f7feedwu-6305
lisp/gnus/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1433
lisp/gnus/gnus-sum.el gnussum.el-20091113204419-o5vbwnq5f7feedwu-1137
=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog 2013-07-26 17:02:22 +0000
+++ b/doc/misc/ChangeLog 2013-07-26 22:24:33 +0000
@@ -1,3 +1,8 @@
+2013-07-26 Tassilo Horn <address@hidden>
+
+ * gnus.texi (Sorting the Summary Buffer): Document new defcustom
+ `gnus-sort-threads-recursively'.
+
2013-07-25 Glenn Morris <address@hidden>
* Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add ido.
=== modified file 'doc/misc/gnus.texi'
--- a/doc/misc/gnus.texi 2013-07-19 14:50:21 +0000
+++ b/doc/misc/gnus.texi 2013-07-26 22:24:33 +0000
@@ -7394,6 +7394,11 @@
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
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2013-07-26 17:02:22 +0000
+++ b/lisp/gnus/ChangeLog 2013-07-26 22:24:33 +0000
@@ -1,3 +1,8 @@
+2013-07-26 Tassilo Horn <address@hidden>
+
+ * gnus-sum.el (gnus-sort-threads-recursively): New defcustom.
+ (gnus-sort-threads): Use it.
+
2013-07-25 Andreas Schwab <address@hidden>
* gnus-art.el (gnus-button-url-regexp): Make it match url in which
=== modified file 'lisp/gnus/gnus-sum.el'
--- a/lisp/gnus/gnus-sum.el 2013-07-14 05:18:48 +0000
+++ b/lisp/gnus/gnus-sum.el 2013-07-26 22:24:33 +0000
@@ -847,6 +847,13 @@
(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.
@@ -4876,9 +4883,11 @@
(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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113562: Gnus: Add option to sort threads non-recursively,
Katsumi Yamaoka <=