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

tag-prefix-cond, cond-end problem?



Hello list!

I'm running Mutt 1.5.9 and I'm attempting to set up a macro using
tag-prefix-cond and cond-end.  What I'm trying to do is tag a set
of messages based on a pattern, unset the N flag, and save them off
to a folder.  Then I want to do this for a number of other patterns.
Right now in my .muttrc I've got this:

> bind index { tag-prefix-cond
> bind index } end-cond
> 
> macro index \ef '\
> T\[rt-u^M{Wns=rt^M}\
> T\[exim^M{Wns=exim^M}\
> T\[sc-u^M{Wns=sc-users^M}\
> ' 'save things to folders'

(Where you see ^M I've got an actual ^M in there, not just the text
of a carat and the uppercase M).

This works fine until it reaches a pattern for which there are no
matches, at which point mutt just tells me "Nothing to do."  If
I have messages which match each of the patterns, the macro will
successfully go through and save them all into the proper folders,
but as soon as a pattern doesn't match anything, processing stops.
(ie: if something matches [rt-u and [sc-u, but nothing matches [exim,
only the [rt-u messages will be saved properly because processing
stopped at the pattern which didn't match.)  It's almost as if
there's a 'break' statement somewhere, where there should be a
'continue' or something.

I'm planning on trying to dig through the code to see what's up,
but I figured I'd post here first, as it'll be a little bit before
I'm able to do so (also it'll take me a bit to get acquainted with it).

So, anyone have any ideas?  Is this a bug in the processing of end-cond,
or am I just doing something wrong?

-CJ

(oh, and also, I think that { and } would probably make pretty good
defaults for tag-prefix-cond and end-cond...)

-- 
WOW: Kakistocracy         |   "Happiness isn't good enough for me!  I
mutt@xxxxxxxxxxxxxxxx     |              demand euphoria!"
apocalyptech.com/music/   |                  - Calvin