Gnus development mailing list
 help / color / mirror / Atom feed
From: Harry Putnam <reader@newsguy.com>
Subject: Re: expiry-target as function, how about an example
Date: Sat, 29 Dec 2001 15:30:45 -0800	[thread overview]
Message-ID: <m1adw17gey.fsf@reader.newsguy.com> (raw)
In-Reply-To: <m37kr5pvxv.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Sat, 29 Dec 2001 22:18:04 +0100")

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Harry Putnam <reader@newsguy.com> 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.



  reply	other threads:[~2001-12-29 23:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-29  7:51 Harry Putnam
2001-12-29 21:18 ` Lars Magne Ingebrigtsen
2001-12-29 23:30   ` Harry Putnam [this message]
2001-12-29 23:39     ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1adw17gey.fsf@reader.newsguy.com \
    --to=reader@newsguy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).