[MlMt] Tips to make custom (thread arcs) views easier?

Benny Kjær Nielsen mailinglist at freron.com
Sat Jun 25 22:29:08 UTC 2011


On 25 Jun 2011, at 22:50, Mike Brasch wrote:

>> 	transformation = "($ALL_MESSAGES xor $SENT).filter(#thread-id =[c] 
>> $mainOutline.#thread-id)";
>
> Is it possible to make a decision? Something like
>
> if mailbox is "Mailing lists" then ($ALL_MESSAGES xor $SENT). ...
> if mailbox is not "Mailing lists" then ($ALL_MESSAGES). ...
>
> The first case makes sense for mailing lists, but in other cases it is 
> less convenient.

I think this would work:

	transformation = "($ALL_MESSAGES xor $SENT).filter(#thread-id =[c] 
$mainOutline.#thread-id) or $ALL_MESSAGES.filter(#thread-id =[c] 
($mainOutline and ($ALL_MESSAGES xor $MAILING_LISTS)).#thread-id)";

First part is the same as before. The second part does not exclude 
messages in $SENT for any selected messages which are not in the special 
“Mailing Lists” mailbox. You can see that the query language lacks a 
'not' operator to make this less cryptic (to explicitly state 
`$mainOutline and not $MAILING_LISTS`).

The first part could be altered as well which may make it faster (and 
look more like your request):

	transformation = "($ALL_MESSAGES xor $SENT).filter(#thread-id =[c] 
($mainOutline and $MAILING_LISTS).#thread-id) or 
$ALL_MESSAGES.filter(#thread-id =[c] ($mainOutline and ($ALL_MESSAGES 
xor $MAILING_LISTS)).#thread-id)";

The nice thing is that it does not depend on the selected mailbox, but 
only on the selected message(s). (If it works – I haven't tested it.)

-- 
Benny


More information about the mailmate mailing list