2005-10-29 Sat Jari Aalto <jari dot aalto A T cante dot net>
authorSimon Josefsson <jas@extundo.com>
Sat, 29 Oct 2005 09:12:30 +0000 (09:12 +0000)
committerSimon Josefsson <jas@extundo.com>
Sat, 29 Oct 2005 09:12:30 +0000 (09:12 +0000)
* gnus.texi (Sorting the Summary Buffer):
Added `gnus-thread-sort-by-date-reverse'. Added example
host to different sorting in NNTP and RSS groups.

texi/ChangeLog
texi/gnus.texi

index fa0da53..669cb0d 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-29 Sat  Jari Aalto  <jari dot aalto A T cante dot net>
+
+       * gnus.texi (Sorting the Summary Buffer):
+       Added `gnus-thread-sort-by-date-reverse'. Added example
+       host to different sorting in NNTP and RSS groups.
+
 2005-10-28  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus-coding.texi: Split into nodes.
index 776c6ec..2c6d163 100644 (file)
@@ -7008,6 +7008,7 @@ Matching}).
 
 @findex gnus-thread-sort-by-total-score
 @findex gnus-thread-sort-by-date
+@findex gnus-thread-sort-by-date-reverse
 @findex gnus-thread-sort-by-score
 @findex gnus-thread-sort-by-subject
 @findex gnus-thread-sort-by-author
@@ -7025,7 +7026,8 @@ function, a list of functions, or a list containing functions and
 By default, sorting is done on article numbers.  Ready-made sorting
 predicate functions include @code{gnus-thread-sort-by-number},
 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-recipient},
-@code{gnus-thread-sort-by-subject}, @code{gnus-thread-sort-by-date},
+@code{gnus-thread-sort-by-subject},
+@code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-date-reverse},
 @code{gnus-thread-sort-by-score},
 @code{gnus-thread-sort-by-most-recent-number},
 @code{gnus-thread-sort-by-most-recent-date},
@@ -7069,6 +7071,41 @@ say something like:
         gnus-thread-sort-by-score))
 @end lisp
 
+Yet more examples. You can define different sorting to different
+groups. Here is an example for where one @acronym{NNTP} group is
+sorted by subject and the @acronym{RSS} group is sorted by date to see
+the latest news at the top.
+
+@lisp
+(require 'cl)
+
+(defun my-gnus-summary-mode-hook-group-select ()
+  (flet ((lsetq (x val) ;; Local setq
+                (set (make-local-variable x) val)))
+    (cond
+     ;;  In Group buffer to make Debian daily news group press: G m
+     ;;  and point it to nntp server news.gmane.org and
+     ;;  group gmane.linux.debian.user.news
+     ((string-match "nntp.*debian.user.news" gnus-newsgroup-name)
+      (lsetq 'gnus-show-threads nil)
+      (lsetq 'gnus-article-sort-functions 'gnus-article-sort-by-date-reverse)
+      (lsetq 'gnus-use-adaptive-scoring nil)
+      (lsetq 'gnus-use-scoring nil))
+     ;;  In Group buffer to read Debian weekly news RSS feed press: G R
+     ;;  and point it to url:
+     ;;  http://packages.debian.org/unstable/newpkg_main.en.rdf
+     ((string-match "nnrss.*debian" gnus-newsgroup-name)
+      (lsetq 'gnus-show-threads nil)
+      (lsetq 'gnus-article-sort-functions 'gnus-article-sort-by-subject)
+      (lsetq 'gnus-use-adaptive-scoring nil)
+      (lsetq 'gnus-use-scoring t)
+      (lsetq 'gnus-score-find-score-files-function 'gnus-score-find-single)
+      (lsetq 'gnus-summary-line-format "%U%R%z%d %I%(%[ %s %]%)\n")))))
+
+(defun my-gnus-summary-mode-hook  ()
+  (my-gnus-summary-mode-hook-group-select))
+@end lisp
+
 @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