mutt mailboxes setting in multiple-file configuration

1

I have an issue I don't understand when setting my mailboxes in mutt. If I use a single configuration file, the following works fine:

mailboxes +myaccount/INBOX \
          +myaccount/Drafts \
          +myaccount/Blah \
          +myaccount/Sent \

macro index c "<change-folder>?<toggle-mailboxes>" "open a different folder"
macro pager c "<change-folder>?<toggle-mailboxes>" "open a different folder"

Now, I want to put mailboxes in a separate configuration file (to use the same muttrc on different machines). But if I put the mailboxes command in ~/.mutt/mboxconf and the macro in ~/.mutt/bindings, then the macro does not work any more. How come? Is mailboxes some kind of a local configuration variable?

(I noticed the same problem with the sidebar patch. It only works if mailboxes is defined in ~/.muttrc.)

Stéphane Caron

Posted 2015-06-20T03:23:11.533

Reputation: 113

Answers

1

You can't include the \ after +myaccount/Sent \ in the separate config file. Or at least, the following works for me:

~/.muttrc contains:

source ~/.mutt/mboxconf
source ~/.mutt/bindings

And ~/.mutt/mboxconf contains:

mailboxes +myaccount/INBOX \
          +myaccount/Drafts \
          +myaccount/Blah \
          +myaccount/Sent

And ~/.mutt/bindings contains:

macro index c "<change-folder>?<toggle-mailboxes>" "open a different folder"
macro pager c "<change-folder>?<toggle-mailboxes>" "open a different folder"

But as soon as I add a \ after +myaccount/Sent the macros no longer work.

puzzlement

Posted 2015-06-20T03:23:11.533

Reputation: 261