Dear Mutt developers,

I am using mutt daily for several years now.

Lately I have been missing a possibility to run a hook whenever
a message is displayed. The `message-hook` is nearly what I need,
but unfortunately it is also executed in other scenarios (during
reply, save, copy, ...).

Would you consider adding a new hook, something in the lines of
`display-hook`, which would behave similarly to message-hook, but would
be executed only when displaying a mail? Technically I was thinking
about calling it just after message-hook during message display, i.e.,
after https://gitlab.com/muttmua/mutt/-/blob/master/commands.c#L171

I can prepare a pull request on gitlab, but first I wanted to check
whether you would even consider such a functionality.

Or is there maybe another way how to execute a hook exactly when
a message is displayed?

Thanks & cheers,
Milan Straka

PS: One of the functionality in mind is to be able to keep flagged
messages unread, i.e., something like `display-hook ~F push "wO"`,
or even unread messages unread, i.e., `display-hook ~U push "wO"`.

Attachment: signature.asc
Description: PGP signature

Reply via email to