From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/24129 Path: main.gmane.org!not-for-mail From: Mike McEwan Newsgroups: gmane.emacs.gnus.general Subject: [patch] `gnus-agent-get-undownloaded-list' and one prospective Date: 10 Jul 1999 21:43:49 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035161749 7042 80.91.224.250 (21 Oct 2002 00:55:49 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:55:49 +0000 (UTC) Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id QAA19752 for ; Sat, 10 Jul 1999 16:46:29 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by farabi.math.uh.edu (8.9.1/8.9.1) with ESMTP id PAB28898; Sat, 10 Jul 1999 15:46:24 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 10 Jul 1999 15:46:56 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id PAA29909 for ; Sat, 10 Jul 1999 15:46:46 -0500 (CDT) Original-Received: from finch-post-12.mail.demon.net (finch-post-12.mail.demon.net [194.217.242.41]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id QAA19738 for ; Sat, 10 Jul 1999 16:45:42 -0400 (EDT) Original-Received: from lotusland.demon.co.uk ([158.152.62.156]) by finch-post-12.mail.demon.net with esmtp (Exim 2.12 #1) id 11340D-000O5a-0C for ding@gnus.org; Sat, 10 Jul 1999 20:45:41 +0000 Original-Received: from mike by lotusland.demon.co.uk with local (Exim 3.02 #1) id 11340o-0004Nv-00 for ding@gnus.org; Sat, 10 Jul 1999 21:46:18 +0100 Original-To: ding@gnus.org User-Agent: Gnus/5.070095 (Pterodactyl Gnus v0.95) XEmacs/21.2 (Sumida) Original-Lines: 101 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:24129 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:24129 A couple of little things... The Agent has been marking cached articles in my newsgroups as `undownloaded' where they are articles that no longer have an entry in `gnus-agent-article-alist'. In addition to addressing the above, the patch below offers a way of changing the `sub-thread' sorting behaviour for a given group. I find it of particular benefit with mailing lists. There's an accompanying brief addition to the manual. Lars, do you think it's worth having? I noticed a couple of old posting/mailings enquiring about such function. -- Mike. diff -ur pgnus-orig/lisp/ChangeLog pgnus/lisp/ChangeLog --- pgnus-orig/lisp/ChangeLog Sat Jul 10 16:41:04 1999 +++ pgnus/lisp/ChangeLog Sat Jul 10 20:47:05 1999 @@ -1,3 +1,12 @@ +1999-07-10 Mike McEwan + + * gnus-sum.el (gnus-sort-gathered-threads-function): New variable. + (gnus-sort-gathered-threads): Allow the user to specify the + function to use when sorting gathered threads. + + * gnus-agent.el (gnus-agent-get-undownloaded-list): Don't + mark cached articles as `undownloaded'. + Fri Jul 9 22:21:16 1999 Lars Magne Ingebrigtsen * gnus.el: Pterodactyl Gnus v0.95 is released. diff -ur pgnus-orig/lisp/gnus-agent.el pgnus/lisp/gnus-agent.el --- pgnus-orig/lisp/gnus-agent.el Wed Jul 7 13:58:10 1999 +++ pgnus/lisp/gnus-agent.el Sat Jul 10 20:36:46 1999 @@ -521,7 +521,8 @@ article) (while (setq article (pop articles)) (unless (or (cdr (assq article gnus-agent-article-alist)) - (memq article gnus-newsgroup-downloadable)) + (memq article gnus-newsgroup-downloadable) + (memq article gnus-newsgroup-cached)) (push article gnus-newsgroup-undownloaded)))) ;; Then mark downloaded downloadable as not-downloadable, ;; if you get my drift. diff -ur pgnus-orig/lisp/gnus-sum.el pgnus/lisp/gnus-sum.el --- pgnus-orig/lisp/gnus-sum.el Fri Jul 9 20:16:21 1999 +++ pgnus/lisp/gnus-sum.el Sat Jul 10 20:36:46 1999 @@ -853,6 +853,9 @@ (defvar gnus-thread-indent-array nil) (defvar gnus-thread-indent-array-level gnus-thread-indent-level) +(defvar gnus-sort-gathered-threads-function 'gnus-thread-sort-by-number + "Function called to sort the articles within a thread after it has +been gathered together.") ;; Avoid highlighting in kill files. (defvar gnus-summary-inhibit-highlight nil) @@ -3008,7 +3011,7 @@ (while threads (when (stringp (caar threads)) (setcdr (car threads) - (sort (cdar threads) 'gnus-thread-sort-by-number))) + (sort (cdar threads) gnus-sort-gathered-threads-function))) (setq threads (cdr threads))) result)) diff -ur pgnus-orig/texi/ChangeLog pgnus/texi/ChangeLog --- pgnus-orig/texi/ChangeLog Sat Jul 10 16:41:04 1999 +++ pgnus/texi/ChangeLog Sat Jul 10 21:25:08 1999 @@ -1,3 +1,8 @@ +1999-07-10 Mike McEwan + + * gnus.texi (More Threading): Document new variable + `gnus-sort-gathered-threads-function'. + 1999-07-09 19:41:34 Lars Magne Ingebrigtsen * gnus.texi (Using MIME): Addition. diff -ur pgnus-orig/texi/gnus.texi pgnus/texi/gnus.texi --- pgnus-orig/texi/gnus.texi Sat Jul 10 16:41:04 1999 +++ pgnus/texi/gnus.texi Sat Jul 10 21:20:52 1999 @@ -5126,6 +5126,18 @@ This is a number that says how much each sub-thread should be indented. The default is 4. +@item gnus-sort-gathered-threads-function +@vindex gnus-sort-gathered-threads-function +Sometimes, particularly with mailing lists, the order in which mails +arrive locally is not necessarily the same as the order in which they +arrived on the mailing list. Consequently, when sorting sub-threads +using the default @code{gnus-thread-sort-by-number}, responses can end +up appearing before the article to which they are responding to. Setting +this variable to an alternate value +(e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an +appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a +more logical sub-thread ordering in such instances. + @end table