1

I have defined in Mutt two "trash" macros -- one for the Trash folder (just mark as deleted and sync) and one for the remaining folders (save into Trash and sync):

folder-hook . 'macro index <delete> "s=Trash<enter><enter><sync-mailbox><change-folder>^<enter>"'
folder-hook =Trash 'macro index <delete> "<delete-message><sync-mailbox><change-folder>^<enter>"'

Together with set delete = yes this results in messages immediately being expunged, no questions asked. Such a behaviour is fine outside the Trash folder, however, I'd like Mutt to ask for confirmation before messages are deleted from Trash.

The only workaround that I have come up with so far is not to sync in the macro (i.e., use only <delete-message> there), thus having to live with deleted messages being present until I sync manually. (Which is not ideal...)

Is it possible to change this setup so that -- in Trash -- Mutt would ask for confirmation before actually marking the messages as deleted and expunging them?

Thanks.

1 Answer 1

0

I think changing delete option at the beginning of the macro to ask-no and reseting to yes at the end should do the trick.

folder-hook =Trash 'macro index <delete> "set delete=ask-no;<delete-message><sync-mailbox><change-folder>^<enter>set delete=yes"'
1
  • 1
    Thank you. Although since the time of posting the question I moved on to using purge-message without sync-mailbox (makes for a faster user experience with the option to undelete messages if need be), other people might still find your answer useful. Commented Nov 3, 2023 at 17:51

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.