On Sun, Jan 31, at 05:12 Chris G wrote: > Is there any fairly straightforward way to save what you see in the > mutt pager as a file? I want to record some E-Mail as files for > another application and what I need to do basically is save what I can > see on the screen as a file which I can name.
If you just want to save the body of the file, you just press 'v' and then just save it. If you want to save also the headers, then it can be done with a macro. Here is a possible way to do it with vim (careful with the wrapping): macro pager <f8> ':unset wait_key<enter>:ignore *<enter>:unignore From:<enter>\ :unignore To:<enter>:unignore Subject:<enter>:unignore Date:<enter>\ :set pipe_decode<enter><pipe-message>vim -c "let savetofile = \ input(\"Location to save the file: \", \"\", \"dir\")" \ -c "exec \"write \".savetofile" -c "quit" -\ <enter>:source /path/to/headers<enter>:set pipe_decode=no<enter>:set wait_key<enter>' Substitute the path to headers, to a file that might contain valid mutt commands, e.g., ignore * unignore From: unignore To: unignore Reply-To: ... etc Further adjustments can be done of course, but from a quick test this seems to work. The input() vim function takes care for auto-completion also. Regards, Agathoklis.