This ticket is to track the progress of removing the trigger-system in favour of a more comprehensive hooks system. Hooks that have been suggested are:
Hook | triggered when | Status |
---|---|---|
message-received |
a mail is received | ✅ |
flag-changed |
a message's flags have been modified | |
mesage-moved |
a message has been moved | |
message-copied |
a message has been copied | |
message-deleted |
a message has been deleted | |
message-post-compose |
a message's content has been edited | |
message-postponed |
a message has been postponed | |
message-sent |
a message has been sent | |
folder-created |
a folder/inbox is created | |
folder-moved |
a folder/inbox is renamed/moved | |
folder-deleted |
a folder/inbox is deleted | |
aerc-startup |
aerc is starting | ✅ |
aerc-shutdown |
aerc is quit | ✅ |
tag-modified |
a notmuch tag is added/removed |
Discussion on aerc-discuss
Suggested-by: ~ferdinandyb
This requires a completely different system from triggers. To avoid keeping two ways of doing it, triggers will be deprecated as soon as the
message-received
hook has been implemented.
There are no arguments for actually "replacing" triggers with hooks. Simply adding more triggers would be less disruptive as you will not need to deprecate anything. The current only
new-email
trigger can remain and you can add all these new ones. The triggers already allow running shell commands.
Moritz Poldrack referenced this ticket in commit 2fef0f4.
Moritz Poldrack referenced this ticket in commit f10b184.
Moritz Poldrack referenced this ticket in commit b46b2d2.