* On Wed, Jul 22, 2015 11:35AM -0400 Peter P. (peterpar...@fastmail.com) muttered: > I have bound the 'd' key to move mails to a trash folder, and 'D' to > move an entire thread to a trash folder: > > folder-hook . 'macro index,pager d "<save-message>=INBOX.Trash \r" > folder-hook . 'macro index,pager D > "<tag-thread><tag-prefix><save-message>=INBOX.Trash \r"
> This doesn't prevent me from accidentally moving these messages twice, > eg when the first mails in a thread are deleted using 'd' (and are > marked deleted accordingly) with a subsequent use of 'D' the entire > thread, including the messages that got deleted already, gets saved to > the trash folder again, causing duplicates. You could use the trash folder patch included in most distros. Then you wouldn't need those macros. > Is there a way to execute above scripts only on messages and threads > whose status is not 'deleted'? You could add a <sync-mailbox> after the first macro. Though that might be expensive depending on the mailbox type and/or unwanted since you don't get the chance to undo. With the first message out of the way, you don't get dups. > PS: Does anyone know of a simple way to disply identical duplicated > messages with mutt, and optionally delete only the duplicates? See Section Pattern Modifiers in the Manual. ~= duplicated messages (see $duplicate_threads) <limit> l show only messages matching a pattern <delete-pattern> D delete messages matching a pattern HTH, Michael -- PGP-Key-ID: EEE7D043 Jabber: in...@jabber.de