From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/41070 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.gnus.general Subject: expiry-target as function, how about an example Date: Fri, 28 Dec 2001 23:51:26 -0800 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 1035176525 4242 80.91.224.250 (21 Oct 2002 05:02:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 05:02:05 +0000 (UTC) Return-Path: Original-Received: (qmail 2067 invoked from network); 29 Dec 2001 07:53:08 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 29 Dec 2001 07:53:08 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16KEI8-0008QS-00; Sat, 29 Dec 2001 01:52:28 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 29 Dec 2001 01:52:21 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id BAA25368 for ; Sat, 29 Dec 2001 01:52:11 -0600 (CST) Original-Received: (qmail 2042 invoked by alias); 29 Dec 2001 07:52:08 -0000 Original-Received: (qmail 2036 invoked from network); 29 Dec 2001 07:52:08 -0000 Original-Received: from smtp.newsguy.com (HELO newsguy.com) (209.155.56.71) by gnus.org with SMTP; 29 Dec 2001 07:52:08 -0000 Original-Received: from reader.local.lan (adsl-66.51.210.228.dslextreme.com [66.51.210.228]) by newsguy.com (8.9.1a/8.9.1) with ESMTP id XAA22232 for ; Fri, 28 Dec 2001 23:51:33 -0800 (PST) Original-Received: (from reader@localhost) by reader.local.lan (8.11.6/8.11.6) id fBT7pR716273; Fri, 28 Dec 2001 23:51:27 -0800 Original-To: Original-Lines: 33 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i586-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:41070 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:41070 The nearest thing to an example of expiry-target used as a funtion is the description of it in the manual: o . . . . . . . . . . . . . . . . . . . . . . . or a function o (which will be called in a buffer narrowed to the message in question, o and with the name of the group being moved from as its parameter) which o should return a target - either a group name or `delete'. How would one insert a homemade funtion here: o Here's an example for specifying a group name: o (setq nnmail-expiry-target "nnml:expired") o o Gnus provides a function `nnmail-fancy-expiry-target' which will o expire mail to groups according to the variable o `nnmail-fancy-expiry-targets'. Here's an example: o o (setq nnmail-expiry-target 'nnmail-fancy-expiry-target o nnmail-fancy-expiry-targets o '((to-from "boss" "nnfolder:Work") o ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b") o ("from" ".*" "nnfolder:Archive-%Y"))) How can I slip a homemade function in here that processes the message being expired? Something like this: (defun hp-process-exp () "Run procmail/formail against this message" (interactive) (shell-command "process_exp.ksh < THIS_BUFFER" nil nil)) Where process_exp.ksh is scripting that runs stdin thru a procmail setup that decides what to do with each expiry candidate.