Every message I delete I also want to mark as read. Thus I redefine the key binding d as follows

macro index d ":set resolve=no<enter><clear-flag>N:set resolve=yes<enter><delete-message>"

Deleting messages, regardless if they are read or unread, deletes them and, well, also clears flag N. Everything fine here.

However, if I want to delete multiple mails by marking and deleting them, nothing happens. That means, I tag same mails via t and then I proceed with ;d and nothing happens. Does this mean that tag-prefixing does not work for macros? Any ideas?

I'm using mutt version 1.12.1

1 Answer 1


<tag-prefix> repeats the next instruction, not the next keystroke. When a keystroke is a binding, it's by definition only one instruction, and you get what you expect. When a keystroke is a macro, it triggers only the first instruction in the macro.

See https://gitlab.com/muttmua/mutt/wikis/MuttGuide/Macros#special-usage-applying-to-several-tagged-entries for some suggestions on this use case.

  • Uhh haven't expect that. Is it possible to have mutt emit a warning in such cases? I mean if I configure a macro with more than one instruction and use it in a case where exactly one instruction is executed, getting a warning would be user friendly. Nonetheless, thanks for your advice!
    – Max Maier
    Aug 23, 2019 at 17:50
  • If I remember, there's no alternative except with third-party patches.
    – dgc
    Aug 27, 2019 at 5:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .