On Mon, Dec 28, 2020 at 01:23:18AM +0300, Consus wrote:
I have some questions about the intended new_mail_command behavior. Two things are weird to me:1. It's called only if there is no new mail already in the mailbox.
The behavior of $new_mail_command is simple and piggybacks on existing Mutt behavior (i.e. $beep_new); so it's not a great substitute for an external buffy program.
For the current mailbox, it fires just after $beep_new, or when the "New mail in this mailbox." message is printed. That will be whenever "new" messages arrive in the mailbox (even if they are not unread).
However both $beep_new and $new_mail_command won't fire on a "reopen" event. This happens when you see the message "Mailbox was externally modified. Flags may be wrong.", so it's not fool-proof.
For the buffy list, it also fires just after $beep_new, or when a "New mail in xxx, xxx, .." is printed. Just like the buffy notification message, this won't occur for a mailbox that has already been notified.
2. Format options are expanded with regards to the currently opened mailbox, not the mailbox that received mail.
Yes, it only provides access to the current values of $status_format. Also, it only fires once per buffy notification message, not per mailbox.
So, yes, $new_mail_command, is pretty limited - basically an external command firing of $beep_new. But the patch (from Yoshiki) was also very simple. I don't think there's much desire to add complexity to support more sophisticated buffy program functionality.
-- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
Description: PGP signature