Gnus development mailing list
 help / color / mirror / Atom feed
* [patch] `gnus-agent-get-undownloaded-list' and one prospective
@ 1999-07-10 20:43 Mike McEwan
  0 siblings, 0 replies; only message in thread
From: Mike McEwan @ 1999-07-10 20:43 UTC (permalink / raw)


  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  <mike@lotusland.demon.co.uk>
+
+	* 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  <larsi@menja.ifi.uio.no>
 
 	* 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  <mike@lotusland.demon.co.uk>
+
+	* gnus.texi (More Threading): Document new variable
+	`gnus-sort-gathered-threads-function'.
+
 1999-07-09 19:41:34  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 	* 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
 
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-07-10 20:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-10 20:43 [patch] `gnus-agent-get-undownloaded-list' and one prospective Mike McEwan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).