Gnus development mailing list
 help / color / mirror / Atom feed
* expiry-target as function, how about an example
@ 2001-12-29  7:51 Harry Putnam
  2001-12-29 21:18 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Harry Putnam @ 2001-12-29  7:51 UTC (permalink / raw)


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.



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

end of thread, other threads:[~2001-12-29 23:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-29  7:51 expiry-target as function, how about an example Harry Putnam
2001-12-29 21:18 ` Lars Magne Ingebrigtsen
2001-12-29 23:30   ` Harry Putnam
2001-12-29 23:39     ` Lars Magne Ingebrigtsen

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