Gnus development mailing list
 help / color / mirror / Atom feed
* using gnus-exit-group-hook to move old messages
@ 1999-11-10 17:19 rune.froysa
  1999-11-12  5:48 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: rune.froysa @ 1999-11-10 17:19 UTC (permalink / raw)


I'm trying to figure out how to make gnus move old mail to a seperate
folder rather than deleting them (with expiration).  I'm aware that
this has been discussed earlier, but no solution has evolved.

I've started on something like this:

(add-hook 'gnus-exit-group-hook 'archive-old-messages)

(defun archive-old-messages ()
  (let foldername
	(concat gnus-newsgroup-name
	 "-" (format-time-string "%Y" (current-time)) "-"
	 (+ (% 
	     (string-to-int (format-time-string "%m" (current-time)))
	     4)
	    1)))

  ; Figure out what articles are ready for expiration. (Something like
  ; nnfolder-request-expire-articles, but process-mark the articles
  ; rather than deleting them) Hopefully this could be backend
  ; independent

  ; gnus-summary-move-article(foldername) - move the marked articles
  ; to the given folder

  ; only do this for folders defined in a given list
  )

But I'm far from competent enough in elisp to write the commented part
(except the last part) within any reasonable amount of time.

Could anyone give me a hint on how to acomplish something like this?

(The reason that I want to do this is that gnus tends to get slow when
a folder grows beyond 40M+, and I want to archive historic cruft
somewhere without slowing my work, eating up diskspace or geting
numerous irrelevant outputs from grep when searching in mail)

-- 
Rune Frøysa


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

* Re: using gnus-exit-group-hook to move old messages
  1999-11-10 17:19 using gnus-exit-group-hook to move old messages rune.froysa
@ 1999-11-12  5:48 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-11-12  5:48 UTC (permalink / raw)


rune.froysa@usit.uio.no writes:

>   ; Figure out what articles are ready for expiration. (Something like
>   ; nnfolder-request-expire-articles, but process-mark the articles
>   ; rather than deleting them) Hopefully this could be backend
>   ; independent

Instead of doing it this way, you can write a function and put it in
`nnfolder-delete-mail-hook'.  The function is called narrowed to the
message that is to be expired.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen


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

end of thread, other threads:[~1999-11-12  5:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-10 17:19 using gnus-exit-group-hook to move old messages rune.froysa
1999-11-12  5:48 ` Lars Magne Ingebrigtsen

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).