On 2002.01.22, in <[EMAIL PROTECTED]>,
"Jim" <[EMAIL PROTECTED]> wrote:
> Is there a graceful way to change the Subject: lines on
> a set of tagged messages? Often folks will change the
> ...
> I tried the '|' pipe function, ";|..." piping to:
>
> sed 's/^Subject: .*$/Subject: Re: This Thread.../'
You could try writing a macro that sets $editor to a shell script that:
a. filters its $1 argument through a suitable sed command (I'd prefer
formail, personally), then replaces the original $1 file;
b. invokes <edit>
c. sets $editor back to its default value
Your script could even prompt for the new subject line. Hmm -- something
like:
macro index Z "<enter-command>set
editor='mutt-subject-munge'<enter><edit><enter-command>set
editor='the-one-true-editor'<enter>"
% cat $HOME/bin/mutt-subject-change
#!/bin/sh
umask 077
echo "Enter the new subject: \c"
read subject
formail -i "Subject: $subject:" <$1 >$1.2
mv -f $1.2 $1
All untested, of course. No warranties.
--
-D. [EMAIL PROTECTED] NSIT University of Chicago