Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Every other mail client I have used will remove emails from my sight when I delete them. If I change my mind and want the email back, I can always go look for it in the trash. Why does mutt continue to show emails in my inbox after I have deleted them?

Is it possible to hide them as soon as I delete them?

share|improve this question
    
"Expunge" is "empty trash"; you probably mean you want it to hide messages that are flagged as deleted. –  geekosaur May 11 '12 at 22:02
    
@geekosaur thanks, I fixed the wording –  Cory Klein May 11 '12 at 22:10
6  
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>. –  jw013 May 11 '12 at 23:30
1  
Just to add a note, for IMAP this is the protocol's expected behavior. Messages are marked for deletion, but not actually removed until expunged. The purpose is to reduce bandwidth to & from the IMAP server, though this is probably less necessary today than it was 15 years ago. In the last 10 years IMAP clients have increasingly adopted the behavior of moving a message to a Trash folder and immediately expunging or hiding messages marked for deletion from your view. –  Michael Sep 26 '12 at 14:13
    
I rather like the behavior because it allows me to do client filtering (not in Mutt, but others) to "pre-delete" messages I don't usually read, but once in a while want to know what's going on. If I don't care to read them, I just expunge and they go away –  Michael Sep 26 '12 at 14:16
add comment

3 Answers

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.

share|improve this answer
    
As far as I understand the question it is about how to delete an email immediately from view without pressing $ to sync. But you are saying the questioner should do this? –  Raphael Ahrens Mar 20 at 10:33
add comment
<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).

share|improve this answer
    
the command <sync-mailbox> has no effect in my case: "<tag-prefix><save-message>=archive<enter><sync-mailbox>". I still see the message marked as deleted. –  Martin Vegter Nov 29 '13 at 12:03
    
Is the mailbox really called archive? Try taking the equal sign off the front of it? –  dps Jan 6 at 19:49
add comment

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>

share|improve this answer
    
any samples please???? tried 20 binding nothing works. –  holms Oct 16 '12 at 17:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.