From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/26589 Path: main.gmane.org!not-for-mail From: rune.froysa@usit.uio.no Newsgroups: gmane.emacs.gnus.general Subject: using gnus-exit-group-hook to move old messages Date: 10 Nov 1999 18:19:29 +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=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035163769 20188 80.91.224.250 (21 Oct 2002 01:29:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:29:29 +0000 (UTC) Return-Path: Original-Received: from lisa.math.uh.edu (lisa.math.uh.edu [129.7.128.49]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id MAA05826 for ; Wed, 10 Nov 1999 12:19:42 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by lisa.math.uh.edu (8.9.1/8.9.1) with ESMTP id LAB03910; Wed, 10 Nov 1999 11:19:40 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 10 Nov 1999 11:19:58 -0600 (CST) 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 LAA21389 for ; Wed, 10 Nov 1999 11:19:49 -0600 (CST) Original-Received: from myrddraal.uio.no (myrddraal.uio.no [129.240.186.38]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id MAA05819 for ; Wed, 10 Nov 1999 12:19:17 -0500 (EST) Original-Received: (from runefro@localhost) by myrddraal.uio.no (8.9.3/8.9.3) id SAA11132; Wed, 10 Nov 1999 18:19:29 +0100 Original-To: ding@gnus.org Original-Lines: 40 User-Agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) Emacs/20.4 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:26589 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:26589 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