<<< Date Index >>>     <<< Thread Index >>>

Re: macro for mailman moderation?



On Wed, Jul 26, 2006 at 04:31:20PM +0200, Rado S wrote:
> =- William Yardley wrote on Tue 25.Jul'06 at 14:28:31 -0700 -=
 
> > >  macro index M ":set editor=~/bin/mutt_mailman_approve.pl<enter> \
> > > <view-attachments><last-entry><search-reverse>message/rfc822<enter> \
> > > <reply><send-message>:set editor=\"vim +'/^$/+2'\"<enter><exit>"
> > 
> > Couple questions:
> > 
> > 1) When (accidentally) running on a message that is NOT a
> > mailman confirm message, and which has only one MIME part, this
> > macro fails (you end up getting "Save to file: <exit>"
> > 
> > Any way around this?
> 
> 1. use <enter-command> instead of ":".

Does that actually make a difference?

> 2. don't use SPACE between >< , whatever SPACE does for you.

If you mean the spaces between the lines, those aren't actually there...
I just spaced it out over a few lines for readability.

> 3. debug the fail case by starting with only the part up to 1st
> <enter>, then step-by-step expand it with 1 more <> at a time, but
> without sending <enter> so you see where the macro ends, i.e. why
> it fails.

It fails at <send-message> - for some reason, in the attachment viewer
screen, <send-message> gets interpreted as "<save-entry>end-message" (at
least after <reply> fails). 

so if I just go to:
"...<last-entry><search-reverse>message/rfc822<enter><reply><send-message>"
I get:
Save to file: end-message>

> > 2) My "quit" feature (from the script above) doesn't quite work.
> 
> This is quite not enough to analyze it further. More context!

I just want to do whatever makes the editor fail ("aborted unmodified
message"). I'd think just leaving the edited file the same should do
that, but exiting (w/ either 0 or 1) still seems to end up sending the
message even though the original tempfile hasn't changed.

w