Gnus development mailing list
 help / color / mirror / Atom feed
* How can I split old mail based on "Date:"?
@ 2001-09-05 22:14 Rob Browning
  2001-09-05 22:29 ` Nevin Kapur
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Browning @ 2001-09-05 22:14 UTC (permalink / raw)



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


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

end of thread, other threads:[~2001-10-31 22:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-05 22:14 How can I split old mail based on "Date:"? Rob Browning
2001-09-05 22:29 ` Nevin Kapur
2001-09-27 16:46   ` Rob Browning
2001-09-27 18:40     ` Harry Putnam
2001-09-27 21:26       ` Rob Browning
2001-10-31 22:51         ` Rob Browning
2001-09-27 21:54     ` Nevin Kapur

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