Right now we can invoke ! to execute a shell command globally, but we also need another similar thing to pipe a message through a shell command.
Consider a mark_spam() function that wants to train a message as being bogus. Currently I just save messages in ~/Maildir/.new-spam/ and a cronjob picks it up to train it.
However I can imagine that somebody else will want to pipe through spam_bayes, crm114, or similar.
We can already execute commands via os.exec the only part missing is getting the path to the current message.
Suggest: message() will return the path to the currently selected message, then we can do things like:
os.exec( "train-as-spam " .. message() )
New primitive: message(), to return the path to the current message.
This allows piping to commands, etc.
Annoyingly I'd already written current_message so this bug was bogus to begin with.
Reverted the new primitive message(), but updated the implementation of current_message() with the newer code.