Gnus development mailing list
 help / color / mirror / Atom feed
* Expiry of `headers only' groups
@ 1998-07-06 16:10 Mike McEwan
  1998-07-11 20:40 ` Mike McEwan
  0 siblings, 1 reply; 2+ messages in thread
From: Mike McEwan @ 1998-07-06 16:10 UTC (permalink / raw)



  Wehey, I can get through to gnus.org again!

  A small change at my ISP (or somewhere) resulted in my earlier posts
  on this subject evapourating into the ether somehow, so here goes
  again:

  "Well `gnus-agent-expire' seems to be working a bit better these days
  (apart from the occasional partial NOV line in my .overviews). One
  last things I wished expiry processing would handle was the
  expiration of headers in groups where I *only* download headers,
  specifically marking articles for download when they seem of
  interest. As it stood `gnus-agent-expire' would only expire headers
  if I happened to have downloaded at least one article in such
  groups. This is usually fine, but I was getting thousands of headers
  accumulating in high activity groups (e.g. comp.lang.c) where I
  hadn't downloaded an article for a while. The number of group
  headers would get so large that I found myself reluctant to select
  these groups from the group buffer because it took so long to
  prepare the summary buffer, adding to the problem :-).

  The following patch inserts a line in the Agent history file for
  each group, detailing the last header downloaded for a group in a
  given session. Come expiry time, headers are now expired even if no
  articles have been downloaded. My `headers only' groups are now a
  little more manageable."

  I could have it so that such the `last-fetched' lines were only
  inserted into the history file where the download predicate for a
  given group was `false', but I was unsure as to what other weird and
  wonderful predicates people may have out there.

-- 
Mike.

--- ChangeLog.orig	Wed Jul  1 12:34:41 1998
+++ ChangeLog	Sun Jul  5 15:18:18 1998
@@ -1,3 +1,8 @@
+1998-07-05  Mike McEwan  <mike@lotusland.demon.co.uk>
+
+	* gnus-agent.el (gnus-agent-fetch-headers): Note last fetched
+	headers per sesion to aid expiry in `headers only' groups.
+
 Wed Jul  1 13:33:26 1998  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
 	* gnus.el: Gnus v5.6.23 is released.
--- gnus-agent.el.orig	Wed Jul  1 12:34:42 1998
+++ gnus-agent.el	Sun Jul  5 17:38:54 1998
@@ -769,8 +769,11 @@
 	  (gnus-make-directory (nnheader-translate-file-chars
 				(file-name-directory file)))
 	  (write-region (point-min) (point-max) file nil 'silent)
-	  (gnus-agent-save-alist group articles nil))
-	t))))
+	  (gnus-agent-save-alist group articles nil)
+	  (gnus-agent-enter-history "last-header-fetched-for-session"
+				    (list (cons group (nth (- (length  articles) 1) articles)))
+				    (gnus-time-to-day (current-time)))
+	t)))))
 
 (defsubst gnus-agent-copy-nov-line (article)
   (let (b e)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-07-11 20:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-06 16:10 Expiry of `headers only' groups Mike McEwan
1998-07-11 20:40 ` 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).