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

Re: macro for mailman moderation?



=- William Yardley wrote on Wed 26.Jul'06 at  9:56:18 -0700 -=

> > 1. use <enter-command> instead of ":".
> 
> Does that actually make a difference?

... when you redefine ":" to do something else, it does.
Better safe than sorry.

> > 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.

Ah ok, but even then you don't need the SPACE there when you
\-break lines. When it comes to nitty-gritty details, precision is
more useful than readability.

> 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).

Now instead of using the macro, reproduce the steps _manually_ so
that you can see what error msgs or dialogs pass by too fast for
you to notice. Alternatively increase sleep_time.

When you see what happens after a failed reply, you see what mutt
expects from you. Probably it's some dialog that you could avoid
by setting approriate muttrc vars that are "ask-yes/no" by
default or that can be postponed/ disabled altogether.

> 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.

Ahh, now I get it. You want to stop the whole action if the editor
fails (i.e. you applied to the wrong msg), right?

Maybe you have to mess with $sendmail, too, like
        set sendmail=`script prints /bin/false if fail, else real`
where the script has to figure out what to return in the print
depending on the message passed from your editor-script.
This is no macro-abort, but it will prevent sending the eMail out.

=- William Yardley wrote on Wed 26.Jul'06 at 10:16:40 -0700 -=

> [ failing because of unexpected reaction and required interaction ]
> Yeah - I figured it was something like that. Is there any way to
> deal with failures inside macros?

Generally: no.
But if you know why it fails specifically for your case, see
above: some interaction can be disabled.

-- 
© Rado S. -- You must provide YOUR effort for your goal!
Even if it seems insignificant, in fact EVERY effort counts
for a shared task, at least to show your deserving attitude.