Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I press C to copy a certain message to a folder, mutt defaults to a non-existing IMAP folder that "infers" by looking at the current message, I guess. Is there a way to customise this behaviour in such a way:

  • From: USER1, always default to IMAP_FOLDER_A
share|improve this question

I'm not sure if you can change that behavior, but you could declare a macro in the .muttrc like this:

macro index,pager T '<tag-pattern>tagPattern<enter><tag-prefix-cond><save-message>=INBOX.YourFolder<enter><enter><change-folder>=INBOX.YourFolder<enter><enter>'

So, let's do a breakdown:

macro          # Define a macro
index,pager    # Make it work in the index an pager
T              # The keycombo to trigger the macro
'              # Single quoted
<tag-pattern>tagPattern<enter>   # Tag all mails with this pattern
<tag-prefix-cond><save-message>=INBOX.YourFolder<enter>   # Save all tagged messages to this folder
<enter>        # Yeah, we know what we're doing.
<change-folder>=INBOX.YourFolder<enter>   # Go the that folder.
<enter>        # Yeah, we really know what we're doing!
'              # Single Quote, closing.
share|improve this answer

You must log in to answer this question.

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