Why does mutt retain deleted emails in view until you "sync your mailbox" using $?

You can add a dollar-sign "$" after the "d" and mutt will sync immediately after marking the message(s). Hitting "$" any time will just sync.


I believe that jw013 answered the question in his comment:

I suppose some mutt dev long ago decided on this for the default behavior. Showing deleted messages allows you to select and undelete them. If you don't ever intend to use the undelete function, then you could always remap the d key to <purge-message> instead of <delete-message>


<purge-message> 

is not part of the standard mutt distribution. I verified this by reading mutt's documentation, and asking about it on the #mutt freenode irc channel.

You can try something like this

macro index d "<save-message>+bsdad/trash<enter><sync-mailbox>" "copy message to the trash"

Although it will cause a slight delay (it will take about 1 second to sync the mailbox).

Tags:

Mutt