From: yamaoka Date: Sat, 29 Oct 2005 09:29:31 +0000 (+0000) Subject: Synch to No Gnus 200510290912. X-Git-Tag: t-gnus-6_17_4-quimby-~270 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e52270b663bf892e73a19d3c1ec7a54bbb90c654;p=elisp%2Fgnus.git- Synch to No Gnus 200510290912. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9f9b36a..34859dc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2005-10-29 Sat Jari Aalto + + * gnus-sum.el (gnus-article-sort-by-date-reverse): New function. + +2005-10-29 Jari Aalto + + * score-mode.el (gnus-score-edit-done-hook): Introduce variable. + Used in gnus-score.el. + 2005-10-28 Reiner Steib * mm-util.el (mm-codepage-setup): Remove bogus alias test. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 1f15047..38c559c 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -4627,6 +4627,10 @@ using some other form will lead to serious barfage." (gnus-date-get-time (mail-header-date h1)) (gnus-date-get-time (mail-header-date h2)))) +(defsubst gnus-article-sort-by-date-reverse (h1 h2) + "Sort articles in reverse order by root article date." + (gnus-article-sort-by-date h2 h1)) + (defun gnus-thread-sort-by-date (h1 h2) "Sort threads by root article date." (gnus-article-sort-by-date diff --git a/lisp/score-mode.el b/lisp/score-mode.el index dc2185c..5070cc1 100644 --- a/lisp/score-mode.el +++ b/lisp/score-mode.el @@ -31,6 +31,9 @@ (eval-when-compile (require 'static)) (require 'gnus-util) ; for gnus-pp, gnus-run-mode-hooks +(defvar gnus-score-edit-done-hook nil + "*Hook run at the end of closing the score buffer.") + (defvar gnus-score-mode-hook nil "*Hook run in score mode buffers.") diff --git a/texi/ChangeLog b/texi/ChangeLog index e0b0ee4..cf27c6d 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,9 @@ +2005-10-29 Sat Jari Aalto + + * 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 * gnus-coding.texi: Split into nodes. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index b574090..f6d56f2 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -6826,6 +6826,7 @@ gnus $B$O(B @code{Subject} $BMs$rD4$Y$k$3$H$K$h$C$F%9%l%C%I$r=8$a$^$9!#$3$l$O @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 @@ -6843,7 +6844,8 @@ gnus $B$O(B @code{Subject} $BMs$rD4$Y$k$3$H$K$h$C$F%9%l%C%I$r=8$a$^$9!#$3$l$O $B%G%#%U%)%k%H$G$OJB$YBX$($O5-;vHV9f$K4p$E$$$F9T$J$o$l$^$9!#$9$G$KMQ0U$5$l(B $B$F$$$kJB$YBX$(=R8l4X?t$O(B @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}, @@ -6884,6 +6886,42 @@ gnus $B$O(B @code{Subject} $BMs$rD4$Y$k$3$H$K$h$C$F%9%l%C%I$r=8$a$^$9!#$3$l$O gnus-thread-sort-by-score)) @end lisp +@c TRANSLATEME +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 $BJQ?t(B @code{gnus-thread-score-function} ($B%G%#%U%)%k%H$O(B @code{+}) $B$K@_Dj(B $B$5$l$F$$$k4X?t$O!"%9%l%C%I$NAm%9%3%"$r7W;;$9$k$?$a$KMQ$$$i$l$^$9!#LrN)$D(B diff --git a/texi/gnus.texi b/texi/gnus.texi index 33be447..0f9e8ba 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -7005,6 +7005,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 @@ -7022,7 +7023,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}, @@ -7066,6 +7068,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