From 15460705ee9a2a4bc8b94e7989dcba0884df4105 Mon Sep 17 00:00:00 2001 From: Reiner Steib Date: Wed, 7 Sep 2005 15:43:55 +0000 Subject: [PATCH] (gnus-thread-sort-by-recipient): New function to make `gnus-summary-sort-by-recipient' work with threading. --- lisp/ChangeLog | 3 +++ lisp/gnus-sum.el | 20 +++++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 08b0414c0..a167e7441 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2005-09-07 Reiner Steib + * gnus-sum.el (gnus-thread-sort-by-recipient): New function to + make `gnus-summary-sort-by-recipient' work with threading. + * nnweb.el (nnweb-google-wash-article): Print a message if article is not available. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 15aaccc77..3ae05dc39 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -780,20 +780,21 @@ Each list item can also be a list `(not F)' where F is a function; this specifies reversed sort order. Ready-made functions include `gnus-thread-sort-by-number', -`gnus-thread-sort-by-author', `gnus-thread-sort-by-subject', -`gnus-thread-sort-by-date', `gnus-thread-sort-by-score', -`gnus-thread-sort-by-most-recent-number', -`gnus-thread-sort-by-most-recent-date', -`gnus-thread-sort-by-random', and -`gnus-thread-sort-by-total-score' (see `gnus-thread-score-function'). +`gnus-thread-sort-by-author', `gnus-thread-sort-by-recipient' +`gnus-thread-sort-by-subject', `gnus-thread-sort-by-date', +`gnus-thread-sort-by-score', `gnus-thread-sort-by-most-recent-number', +`gnus-thread-sort-by-most-recent-date', `gnus-thread-sort-by-random', +and `gnus-thread-sort-by-total-score' (see +`gnus-thread-score-function'). When threading is turned off, the variable `gnus-article-sort-functions' controls how articles are sorted." :group 'gnus-summary-sort - :type '(repeat + :type '(repeat (gnus-widget-reversible (choice (function-item gnus-thread-sort-by-number) (function-item gnus-thread-sort-by-author) + (function-item gnus-thread-sort-by-recipient) (function-item gnus-thread-sort-by-subject) (function-item gnus-thread-sort-by-date) (function-item gnus-thread-sort-by-score) @@ -4604,6 +4605,11 @@ using some other form will lead to serious barfage." (or (cdr (assq 'To (mail-header-extra h2))) "")))) (or (car extract) (cadr extract))))) +(defun gnus-thread-sort-by-recipient (h1 h2) + "Sort threads by root recipient." + (gnus-article-sort-by-recipient + (gnus-thread-header h1) (gnus-thread-header h2))) + (defsubst gnus-article-sort-by-subject (h1 h2) "Sort articles by root subject." (string-lessp -- 2.34.1