Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
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.