On Thu, 2005-06-23 at 13:15 -0400, Paul Coene wrote: > On Fri, 2005-06-24 at 01:05 +0800, Not Zed wrote: > > Not exactly. > > > > You can run a command when new mail arrives - which sounds like what you > > want, i.e. you dont care what message it is, only that it is the last > > one. It is implemented as a function which runs a program after all > > messages are processed, but not on the 'last' message as such, and it > > doesn't have access to the last message. > > > > You could of course use this to implement the behaviour you describe > > (but may not actually want). i.e. you could run a filter on every > > message, write each to a file, then read that file in the 'after filters > > have run' action, and thus ... run an action on the last message > > filtered. > > The "after filters have run action"???? I don't know about this. > Where can I find it?
This is how play-sound is implemented. It is run after all messages that it knows about at the time are filtered already (or, it is supposed to be). I think you want another solution, run your play-sound command asynchronously if it isn't already running, and when you start it, just save something to say it is. i.e. in a script, do something like: #!/bin/sh stamp=$HOME/.newmailsound if [ ! -f $stamp ] ; ( touch $stamp ; play-sound ; rm $stamp ) & fi Yes it has a small race, and wont clean up if something goes down, but it should suffice. (this assumes play-sound blocks until it is complete, you could add arbitrary sleeps). _______________________________________________ evolution maillist - [email protected] http://lists.ximian.com/mailman/listinfo/evolution
