Lumail - The console email client


Lua primitives: on_delete_message()

NOTE: Lumail-legacy has been superseded by Lumail 2.x, which has a wholly unified Lua API.

If you define the function on_delete_message() it will be invoked immediately prior to the removal of the selected/specified message.

The function will be invoked with the path to the message on-disk.

For example:

function on_delete_message( path )
   msg( "Message deleted: " .. path );
end

NOTE: Any return value is ignored, and you cannot prevent the deletion with this hook. Although if you wish you could save any deleted message to a "trash" folder - which the trash() example demonstrates.

Availability

This function has been available since version 0.19.

See Also

See also current_message, delete, save.