Greg Nisbet
Greg Nisbet

Reputation: 6994

mutt how to move messages to folder containing a literal space

I am trying to use a gmail account in Mutt 1.5.3 on OS X, installed through brew. Using s and navigating to 'All Mail', I can manually save files from my inbox to the all mail folder, but the process is annoyingly manual. I have tried to define a macro to help make this easier.

macro index,pager \CA '<save-message>=[GMAIL]/All\ Mail<enter>'

This macro works in the sense that pressing ctrl-A causes it to fire, and it does ask me if I want to move my messages ... unfortunately it gets the destination wrong. it asks if I want to move the message to 'All' or 'All\Mail'. Somehow the space is completely ignored. I know that the destination folder proposed by the macro is indeed not 'All Mail' (rather than being a bug in the modeline) because mutt prompts me on whether to create the folder or not.

Upvotes: 5

Views: 4908

Answers (1)

Greg Nisbet
Greg Nisbet

Reputation: 6994

Credit: https://stackoverflow.com/a/14779416/931154

You can escape a literal space using %20. Also, in order to back up your message to your online All Mail folder, the following macro should be used.

macro index,pager \CA "<save-message>=[Gmail]/All%20Mail<enter>"

Upvotes: 3

Related Questions