From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/41122 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.gnus.general Subject: Re: expiry-target as function, how about an example Date: Sat, 29 Dec 2001 15:30:45 -0800 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035176568 4485 80.91.224.250 (21 Oct 2002 05:02:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 05:02:48 +0000 (UTC) Return-Path: Original-Received: (qmail 4104 invoked from network); 29 Dec 2001 23:33:10 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 29 Dec 2001 23:33:10 -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 16KSww-0007j1-00; Sat, 29 Dec 2001 17:31:34 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 29 Dec 2001 17:31:26 -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 RAA29371 for ; Sat, 29 Dec 2001 17:31:15 -0600 (CST) Original-Received: (qmail 3738 invoked by alias); 29 Dec 2001 23:31:17 -0000 Original-Received: (qmail 3733 invoked from network); 29 Dec 2001 23:31:17 -0000 Original-Received: from smtp.newsguy.com (HELO newsguy.com) (209.155.56.71) by gnus.org with SMTP; 29 Dec 2001 23:31:17 -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 PAA45652 for ; Sat, 29 Dec 2001 15:30:46 -0800 (PST) Original-Received: (from reader@localhost) by reader.local.lan (8.11.6/8.11.6) id fBTNUjn29805; Sat, 29 Dec 2001 15:30:45 -0800 Original-To: ding@gnus.org In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sat, 29 Dec 2001 22:18:04 +0100") Original-Lines: 42 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:41122 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:41122 Lars Magne Ingebrigtsen writes: > Harry Putnam writes: > >> The nearest thing to an example of expiry-target used as a funtion is >> the description of it in the manual: > > [...] > >> o Here's an example for specifying a group name: >> o (setq nnmail-expiry-target "nnml:expired") > > [...] > >> 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)) > > (setq nnmail-expiry-target 'hp-process-exp) Here we go in nitwit mode... Do you mean something as simple as: cat process_exp.ksh #!/bin/ksh if grep '^From:.*larsi@' >/dev/null;then echo "sacred_keepers" fi Or does the name have to wear more adorment like "nnml:sacred_keepers" If this is all it takes then a semi-complex case statement could pick from almost any number of targets. Oh.. is "/dev/null" amongst the legitimate stings to return? Do the groups have to exist? Hoping to clear up some things before spending too much time experimenting.