Gnus development mailing list
 help / color / mirror / Atom feed
From: rune.froysa@usit.uio.no
Subject: using gnus-exit-group-hook to move old messages
Date: 10 Nov 1999 18:19:29 +0100	[thread overview]
Message-ID: <svl66za5kny.fsf@myrddraal.uio.no> (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


             reply	other threads:[~1999-11-10 17:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-10 17:19 rune.froysa [this message]
1999-11-12  5:48 ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=svl66za5kny.fsf@myrddraal.uio.no \
    --to=rune.froysa@usit.uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).