> Basic question, I know: How can I simplify this so to not repeat amost
identical filter segments:

<<list-links "[all[shadows+tiddlers]!has[draft.of]tag[Foo]]
[all[shadows+tiddlers]!has[draft.of]tag[Bar]]">>

I think that the best we can do at the moment in terms of reducing
repetition is:

[all[shadows+tiddlers]tag[Foo]] all[shadows+tiddlers]tag[Bar]]
+[!has[draft.of]]

We can already use the set widget to store an intermediate filter result.
With a new filter operator to retrieve a list from a variable we could do
this:

<$set name="partial-result" filter="[all[shadows+tiddlers]!has[draft.of]">
<$list filter="[varlist[partial-result]tag[Foo]]
[varlist[partial-result]tag[Bar]]">
...
etc

I think that is quite powerful, but it doesn't really help with an
expressive way of writing an OR relationship.

Best wishes

Jeremy.




On Tue, Mar 31, 2015 at 10:15 AM, Mat <[email protected]> wrote:

> Thank you, but I did not helped you at all :P
>>
>
> But of course - learning that something does not work is definitely also
> of value.
>
>
> This should be a coincidence. I checked on my wiki and it does not work.
>> Which TW version are you using? What is your intention? To get all the
>> tiddlers that are tagged Foo or Bar right?
>>
>
> Sorry, I expressed myself poorly. I meant that *IF* my proposed " a*(b+c)
> = a*b+a*c "  logic would work,  then the [tag[Foo]tag[Bar]] part should
> be simplified to [tag[Foo Bar]]. (Doesn't work now Foo Bar is interpreted
> as one tag with a space.)
>
> Anyway, case closed regarding my syntax question... but it IS somewhat
> surprising to me that I must repeat so much stuff in order to OR multiple
> tags. Maybe there could be compacter "abbreviations" for frequently
> recurring segments such as the [all[shadows+tiddlers]!has[draft.of] part.
> Do you know if this would be possible? Maybe even a transclusion? For
> example:
>
> <<list-links "[all[shadows+tiddlers]!has[draft.of]tag[Foo]]
> [all[shadows+tiddlers]!has[draft.of]tag[Bar]]">>
>
> ...could be
>
> <<list-links "{filter1}[tag[Foo] {filter1}[tag[Bar]">>
>
> ...and, who knows, IF that was possible, then the transcluded parc could
> perhaps be some kind of template allowing my proposed logic after all:
>
> <<list-links "{filter1}([tag[Foo] [tag[Bar])">>
>
> or even
>
> <<list-links "{filter2}([Foo] [Bar])">>
>
>
> <:-)
>
>
> <:-)
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to