From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/38628 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.emacs.gnus.general Subject: How can I split old mail based on "Date:"? Date: Wed, 05 Sep 2001 17:14:23 -0500 Sender: rlb@defaultvalue.org Message-ID: <87sne1thds.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035174461 23500 80.91.224.250 (21 Oct 2002 04:27:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:27:41 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 18509 invoked from network); 5 Sep 2001 22:14:32 -0000 Original-Received: from dsl-209-87-109-2.constant.com (HELO defaultvalue.org) (postfix@209.87.109.2) by gnus.org with SMTP; 5 Sep 2001 22:14:32 -0000 Original-Received: from raven.i.defaultvalue.org (raven.i.defaultvalue.org [192.168.1.7]) by defaultvalue.org (Postfix) with ESMTP id 54955102F for ; Wed, 5 Sep 2001 17:14:30 -0500 (CDT) Original-Received: by raven.i.defaultvalue.org (Postfix, from userid 1000) id 617975349; Wed, 5 Sep 2001 17:14:23 -0500 (CDT) Original-To: ding@gnus.org User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 Original-Lines: 46 Xref: main.gmane.org gmane.emacs.gnus.general:38628 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:38628 I've got some truly gargantuan groups (like debian-user) that I'd like to break up into sub-groups based on date, and I'm wondering what the best way to do this is. Ideally I'd like to be able to just write elisp (for this and other purposes) to do the job. Perhaps something like: (gnus-group-for-each-msg 'my-by-date-splitter) where my-by-date-splitter might look like this: (defun my-by-date-splitter (group article) (let ((header-date (gnus-article-get-date article)) ...) (gnus-group-move-article group new-group))) or similar. [1] gnus probably already has most of the code I'd need, but where should I start looking (i.e. to find out how to map over all articles, how to get the article date, etc.) I'd be happy with an elisp function I could call from the *Group* buffer, or better yet, a function that gets called automatically now and then, or perhaps just a suitable expiry function that moves articles older than say a year to group-yearnumber. I suppose I could just edit my splits and respool, but I want to preserve marks, and I'd rather not have to add a new rule every time I want to do this. Thanks [1] I've occasionally thought it might be nice to have a general purpose elisp or scheme library for manipulating email, and it seems like if the backend format were well enough specified, this shouldn't be too hard from either language for simple tasks (like changing article marks, etc.). i.e. in nnmaildir, it seems like some things would be really easy, given its fs layout... -- Rob Browning rlb @defaultvalue.org, @linuxdevel.com, and @debian.org Previously @cs.utexas.edu GPG=1C58 8B2C FB5E 3F64 EA5C 64AE 78FE E5FE F0CB A0AD