From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: Sorting with threads in Gnus Date: Fri, 26 Jul 2013 17:01:48 +0800 Message-ID: <87d2q5lmo3.fsf@ericabrahamsen.net> References: <87d2q8qy0h.fsf@ericabrahamsen.net> <87vc40drow.fsf@thinkpad.tsdh.org> <871u6mlyx5.fsf@ericabrahamsen.net> <87iozxq3ca.fsf@thinkpad.tsdh.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1374829308 7544 80.91.229.3 (26 Jul 2013 09:01:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Jul 2013 09:01:48 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 26 11:01:48 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 1V2duG-0004Bg-DD for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Jul 2013 11:01:48 +0200 Original-Received: from localhost ([::1]:59496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2duG-0008Df-2x for geh-help-gnu-emacs@m.gmane.org; Fri, 26 Jul 2013 05:01:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2du3-00089d-4K for help-gnu-emacs@gnu.org; Fri, 26 Jul 2013 05:01:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2du0-000270-65 for help-gnu-emacs@gnu.org; Fri, 26 Jul 2013 05:01:35 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:39448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2dtz-00026u-Vz for help-gnu-emacs@gnu.org; Fri, 26 Jul 2013 05:01:32 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V2dty-0003ss-CH for help-gnu-emacs@gnu.org; Fri, 26 Jul 2013 11:01:30 +0200 Original-Received: from 114.250.132.119 ([114.250.132.119]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 26 Jul 2013 11:01:30 +0200 Original-Received: from eric by 114.250.132.119 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 26 Jul 2013 11:01:30 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 86 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 114.250.132.119 User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:6DjLXzLZiDJ+nu5QDkQmeq8oz/Y= 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:92440 Archived-At: Tassilo Horn writes: > Eric Abrahamsen writes: > > Hi Eric, > >>> However, as soon as I add `gnus-thread-sort-by-total-score' and >>> `gnus-thread-sort-by-most-recent-date' to >>> `gnus-thread-sort-functions', the sorting inside threads goes wonky >>> as well... >> >> I doubt I'll be able to help -- I don't use scoring, and most of my gnus >> configurations seem to involve some degree of magical thinking. >> >> Just for clarity, your desired setup, that goes "wonky", would look like >> this: >> >> (setq gnus-thread-sort-functions >> '(gnus-thread-sort-by-total-score >> gnus-thread-sort-by-most-recent-date) >> gnus-sort-gathered-threads-function >> 'gnus-thread-sort-by-date) >> >> Is that right? > > Not quite. I think that would be my perfect setup: > > (setq gnus-thread-sort-functions > '(gnus-thread-sort-by-number > gnus-thread-sort-by-date > gnus-thread-sort-by-most-recent-date > gnus-thread-sort-by-total-score) > gnus-sort-gathered-threads-function 'gnus-thread-sort-by-date) > >> So it's the 'gnus-thread-sort-by-date effect inside the threads >> themselves that's going wrong? Wonky how? > > I don't really see its effect. With > `gnus-sort-gathered-threads-function' set to the default value > `gnus-thread-sort-by-number' I get the same sorting order. > > The problem is that Gnus seems to sort threads and also subthreads with > `gnus-thread-sort-functions'. So in my case, high-score subthreads will > come before low-score subthreads, and when the score is equal, > subthreads with more recent articles will come before subthreads with > older recent articles. But inside threads, I want sorting to be > strictly chronological from old to new. > > For example, below Y should be before the subthread X, because it's > older. > > O ┃ ┃Juanma Barranquero ┃ ╭● frame size&position woes > O ┃ ┃martin rudalics ┃ ├──❯ ;; X > O ┃ ┃Juanma Barranquero ┃ │╰──❯ > O ┃ ┃martin rudalics ┃ │ ├──❯ > O ┃ ┃Juanma Barranquero ┃ │ │╰──❯ > O ┃ ┃Eli Zaretskii ┃ │ │ ╰──❯ > O ┃ ┃Juanma Barranquero ┃ │ │ ╰──❯ > O ┃ ┃Eli Zaretskii ┃ │ │ ╰──❯ > O ┃ ┃Juanma Barranquero ┃ │ │ ╰──❯ > O ┃ ┃Eli Zaretskii ┃ │ │ ╰──❯ > O ┃ ┃Juanma Barranquero ┃ │ │ ╰──❯ > O ┃ ┃Eli Zaretskii ┃ │ │ ╰──❯ > O ┃ ┃Juanma Barranquero ┃ │ │ ╰──❯ > O ┃ ┃Eli Zaretskii ┃ │ │ ╰──❯ > O ┃ ┃Juanma Barranquero ┃ │ │ ╰──❯ > O ┃ ┃Eli Zaretskii ┃ │ │ ╰──❯ > O ┃ ┃Juanma Barranquero ┃ │ │ ╰──❯ > O ┃ ┃Juanma Barranquero ┃ │ ╰──❯ > O ┃ ┃Juanma Barranquero ┃ ╰──❯ ;; Y > > I hoped that `gnus-thread-sort-functions' was applied only to thread > roots, and `gnus-sort-gathered-threads-function' to subthreads, but that > doesn't seem to be tha case. Huh, interesting -- I hadn't realized subthreads were sorted as well, but they are: gnus-sort-threads calls the appropriately-named gnus-sort-threads-recursive. That's hard-coded, and there's nothing to distinguish a top-level thread from a subthread. But I'll bet with a little care, it would be possible to make a gnus-sort-threads-recursively-p option, which would have gnus-sort-threads break to gnus-sort-articles after the first round of sorting... Maybe. Eric