From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/23296 Path: main.gmane.org!not-for-mail From: Matt Pharr Newsgroups: gmane.emacs.gnus.general Subject: Automatic archiving of old mail, questions about gnus internals Date: 14 Jun 1999 15:06:25 -0700 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035161055 1222 80.91.224.250 (21 Oct 2002 00:44:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:44:15 +0000 (UTC) Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id SAA29144 for ; Mon, 14 Jun 1999 18:07:11 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by farabi.math.uh.edu (8.9.1/8.9.1) with ESMTP id RAB02743; Mon, 14 Jun 1999 17:06:56 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 14 Jun 1999 17:07:37 -0500 (CDT) 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 RAA14140 for ; Mon, 14 Jun 1999 17:07:26 -0500 (CDT) Original-Received: from lux.Stanford.EDU (lux.Stanford.EDU [171.64.77.150]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id SAA29118 for ; Mon, 14 Jun 1999 18:06:27 -0400 (EDT) Original-Received: (from mmp@localhost) by lux.Stanford.EDU (8.9.0/8.9.0) id PAA03410; Mon, 14 Jun 1999 15:06:26 -0700 (PDT) Original-To: ding@gnus.org X-Face: C!.oGaE]n@p)VF9Ss3]f'|<)kRrtpG)^^b^X-3_zhUHp\jBj29jaoTItqWR>mHa+v-{/!jx7OA@!cV0>Fm-b:zEL<`oOXG[BFQ\ (- (point-max) (point-min)) 0) seems like a big hack. Is there a better way to check? Is there a better way to do this sort of thing in general (for each group, for these articles, move them here)? Any other comments about the code? Given fixes/suggestions that make this less ugly, I'll submit it as an addition to gnus-demon.el. thanks, -matt (defun mmp:archive-old-mail () (interactive) (let ((newsrc (cdr gnus-newsrc-alist)) group archive-group) (while newsrc (setq group (gnus-info-group (car newsrc))) (if (and (string-match "^nnml:mail." group) (gnus-group-read-group 9999999 t group)) (gnus-atomic-progn (setq archive-group (concat "nnfolder:archive." (replace-match "" nil t group))) (gnus-summary-limit-to-age 180) (gnus-summary-limit-to-marks "!" t) (gnus-uu-mark-buffer) (if (> (- (point-max) (point-min)) 0) (progn (gnus-message 5 "Archiving old messages from %s to %s..." group archive-group) (gnus-summary-move-article nil archive-group) (gnus-summary-exit))))) (setq newsrc (cdr newsrc))))) -- Matt Pharr mmp@graphics.stanford.edu