From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Sorting with threads in Gnus Date: Tue, 30 Jul 2013 10:01:36 +0200 Message-ID: <87hafccw7z.fsf@thinkpad.tsdh.org> References: <87d2q8qy0h.fsf@ericabrahamsen.net> <87vc40drow.fsf@thinkpad.tsdh.org> <871u6mlyx5.fsf@ericabrahamsen.net> <87iozxq3ca.fsf@thinkpad.tsdh.org> <87d2q5lmo3.fsf@ericabrahamsen.net> <87ppu5wjw8.fsf@thinkpad.tsdh.org> <87li4twiy9.fsf@thinkpad.tsdh.org> <87ehalwi6j.fsf@thinkpad.tsdh.org> <871u6li5im.fsf@griffin.dhcp1.hri> <8738r0v0s8.fsf@thinkpad.tsdh.org> <87bo5nduu4.fsf@griffin.dhcp1.hri> <87d2q3az79.fsf@web.de> <87k3kbc8t8.fsf@griffin.dhcp1.hri> <87ppu2ua43.fsf@web.de> <87a9l6d5h5.fsf@griffin.dhcp1.hri> <87li4ocytj.fsf@thinkpad.tsdh.org> <877gg8a4td.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1375171335 30624 80.91.229.3 (30 Jul 2013 08:02:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Jul 2013 08:02:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 30 10:02:17 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V44sq-0000es-FH for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jul 2013 10:02:16 +0200 Original-Received: from localhost ([::1]:37343 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V44sq-00013x-3j for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jul 2013 04:02:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V44sW-0000va-1J for help-gnu-emacs@gnu.org; Tue, 30 Jul 2013 04:02:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V44sQ-000716-PW for help-gnu-emacs@gnu.org; Tue, 30 Jul 2013 04:01:55 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:43317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V44sQ-0006zh-C4 for help-gnu-emacs@gnu.org; Tue, 30 Jul 2013 04:01:50 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V44sM-0000Mw-6e for help-gnu-emacs@gnu.org; Tue, 30 Jul 2013 10:01:46 +0200 Original-Received: from tsdh.uni-koblenz.de ([141.26.67.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Jul 2013 10:01:46 +0200 Original-Received: from tsdh by tsdh.uni-koblenz.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Jul 2013 10:01:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 60 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: tsdh.uni-koblenz.de User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:M/RQ+MYAzX5r4BW2t71SkcMfwbo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92532 Archived-At: Eric Abrahamsen writes: >> That's actually the same as the order I had before my latest change, >> but maybe that was only a coincidence. At least it seems more >> correct to explicitly sort subthreads chronologically instead of not >> sorting them at all. > > I think it defaults to sorting by article number, which often looks a > lot like date -- docs seem to say that one is dependent on when the > message is sent, and the other on when it arrives... Yeah, but my code stopped sorting of subthreads at all. So I basically assumed that the threads were sorted according to article number before they were passed to the thread sorting functions. That's probably a false assumption. Anyway, my last changes made the name `gnus-sort-threads-recursively' inappropriate. And also it was only a minor step away from custom subthread sorting. So now I've implemented that: ,---- | commit fff80f88ef397fca65cb382217ce9c9a08b1329e | Author: Tassilo Horn | Date: Tue Jul 30 09:52:15 2013 +0200 | | Make subthread sorting customizable and add docs for it. | | * gnus-sum.el (gnus-subthread-sort-functions): New defcustom. | (gnus-sort-threads-recursively): Delete defcustom. | (gnus-sort-threads-recursive): Adapt accordingly. | | * gnus.texi (Sorting the Summary Buffer): Document new defcustom | `gnus-subthread-sort-functions' and remove the obsolete documentation | of `gnus-sort-threads-recursively'. | `---- So `gnus-sort-threads-recursively' is gone now, and `gnus-subthread-sort-functions' takes its place. By default its value is 'gnus-thread-sort-functions which means to sort subthreads also using `gnus-thread-sort-functions', but you can set it to any list of sort functions you want. So now I use this: --8<---------------cut here---------------start------------->8--- (setq gnus-thread-sort-functions '(gnus-thread-sort-by-number gnus-thread-sort-by-most-recent-date gnus-thread-sort-by-total-score) gnus-subthread-sort-functions '(gnus-thread-sort-by-number gnus-thread-sort-by-date) gnus-sort-gathered-threads-function 'gnus-thread-sort-by-date) --8<---------------cut here---------------end--------------->8--- So threads are sorted from highest score/most recent article to lowest score/least recent article, but inside threads I simply sort from old to new. Bye, Tassilo