On Thu, Jan 31, 2002 at 11:29:57PM -0800, Michael Elkins wrote:
> > How do I save a message to a file (like the [E]xport command in pine)
> > such that all text attachments are included, as well as the headers of
> > the message?
>
> If your $mbox_type is set to mbox, then a simple C (copy-message) will
> do what you want.  Otherwise you will need to create a macro like such:
>       macro E index "<pipe-message>cat > "
> and just append the filename you want to the end of the command.

It should be "macro index E", not "macro E index", BTW. (I'm using
Maildir, not mbox.)

That's a bit better than pressing "e" and using the vi ":w" command to
save the message. It's still not as good as pine's [E]xport command,
though. It will write out all the uninteresting headers of the message
(Return-Path, Delivered-To, Received, Message-ID, etc.) rather than
only the ones I've defined in the "my_hdr" configuration option. When
I export a message, I'm doing it for the purpose of printing it or
including it in a document I'm writing so I wouldn't want all those
extra headers.

I don't suppose there's a command like <pipe-message>, except that it
filters headers (the header filtering code is already available in the
pager, after all)? Or would I have to write an external header
filtering program and then do something like:

macro index E "<pipe-message> perl filter_header.pl > "

which isn't exactly the optimal solution, since an external program
does not have ready access to my configuration file my_hdr settings,
but would work I suppose.

Reply via email to