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

Re: [un]alternates not quite working



On Wed, May 19, 2004 at 04:50:21AM EDT, Thomas Roessler wrote:
> On 2004-05-18 14:45:40 -0400, David Yitzchak Cohen wrote:

> > which in turn would require either (a) two new statements
> > (nonalternates and unnonalternates in this case, maybe?) for
> > every statement pair that currently uses regex lists, or (b) a
> > "clever" overloading of the current alternates and unalternates
> > commands to make them do "the right thing" by trying to guess
> > which operation you wanted to invoke.
> 
> That sounds solvable to me -- IF the regular expression passed to
> unalternates is literally identical (strcmp == 0) to a regular
> expression already "alternated", then delete that expression.
> Otherwise, add the expression to the "un"-list.

Well, you'd also have to do the converse when a regex is passed to the
alternates command (checking to see whether an exactly identical regex
is already in the "unalternated" list).  This can start getting a little
ugly, especially if somebody comes along tomorrow with a feature request
that these statements collapse unneeded parentheses when performing
the comparisons.

> (I think we are doing something similar with header weeding already,
> so this would just be consistent.)

Well, whatever we're doing with header weeding doesn't allow you to
unignore stuff that you haven't ignored already, with the sole exception
of when you "ignore *" first.  Maybe it just builds up a list of stuff
to _not_ ignore instead if you give it an "ignore *" statement, but
otherwise has identical semantics to alternates/unalternates?

 - Dave

-- 
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler.  You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel

Attachment: pgp5ENZNmzuCu.pgp
Description: PGP signature