[Users] nesting conditions in matcherrc
Adrian
adrian at aeolian.org.uk
Sat Aug 28 11:38:39 UTC 2021
Thank you wwp
Yes I understand about the test for Fred. I was using 'shorthand'.
I'd happily use the UI if it wasn't so much harder than hacking the
text. I get it wrong more often with the UI than with editing. I know
it's syntactically correct, but syntactically-correct-and-does-nothing
is no help!
Adrian
Hello Adrian,
On Sat, 28 Aug 2021 07:48:50 +0100 Adrian via Users <users at lists.claws-mail.org> wrote:
> I tried setting the following in matcherrc
> condition1 & condition2 | condition3...
>
> and it gets rewritten as
> condition1 | condition2 | condition3...
>
> What I actually need of course is
> condition1 & (condition2 | condition3...)
>
> Can this be done?
It can't. Mixing & and |, () and de facto operator precedence are not
implemented.
> If not, is there a way to test for (e.g.) any of a set of strings IF
> the From is 'Fred' ?
Your question is not clear to me. Moreover, "is" is not accurate
enough. Does it mean "contains" or "is equal to"?
If you need to determine if the From header contains or is Fred,
semantically it could appear to be the same, but in the domain of
filtering expressions, it's definitely different.
What you might only need is one condition:
from matchcase "Fred"
but it may match much more than what you expect.
> OK, confession. I edit matcherrc manually so I can't expect claws mail
> to handle everything I do. I'm prepared to behave and use the UI if it
> will let me do this.
Editing by hand the matcherrc file is not what I'd call a good idea,
unless you really know what you're doing and well know how filtering
works and filtering expressions in Claws Mail. Getting to the UI is
what I'd recommend ;-).
Regards,
--
wwp
https://useplaintext.email/
On Sat, 28 Aug 2021 07:48:50 +0100
Adrian <adrian at aeolian.org.uk> wrote:
> I tried setting the following in matcherrc
> condition1 & condition2 | condition3...
>
> and it gets rewritten as
> condition1 | condition2 | condition3...
>
> What I actually need of course is
> condition1 & (condition2 | condition3...)
>
> Can this be done?
>
> If not, is there a way to test for (e.g.) any of a set of strings IF
> the From is 'Fred' ?
>
> OK, confession. I edit matcherrc manually so I can't expect claws
> mail to handle everything I do. I'm prepared to behave and use the UI
> if it will let me do this.
>
> Thanks!
>
> Adrian
More information about the Users
mailing list