Re: [tw] TW5 list filter that returns tiddlers with both of two tags

2015-10-30 Thread Tobias Beer
Hi Matabele,

Thanks for your valuable input.
 

> Perhaps this should be generalised for any list (not only the tags field.)
>

I very much agree. The more general, the better.

"[[prefilter[]] +[listhas:{mylist!!ofitems}]"
>

This would not be quite sufficient as we have not yet specified what 
list-field to actually check against.

Perhaps...

"[contains:some-list-field:any{these!!listed-items}]"

"[contains:tags:all{my-special!!tags}]"
 
Since one of *any* or *all* will be the default, we can skip the 
"secondary" suffix for that.
I suspect *any* to be the more common use case, so:

"[contains:tags{any-of!!these-tags}]"

I would be fine with a secondary suffix, it's just as good as any other 
suffix. But, if we really want the duplication we could also have a 
separate filter:

"[containsall:tags{all-of!!these-tags}]"

The other is to first set up the list of items to search for, then specify 
> the reference pointing to the list to be search (perhaps by generalising 
> the tagging[] operator):
>
> "[[my list]] [[of items]] +[tagging{my!!list}]"
>

I would want to avoid this syntax altogether as it is difficult, if not 
impossible, to combine it with any preceding or subsequent filters. For 
one, it would have to always be at the beginning of a filter expression.

I have updated the issue on GitHub to cover a more general list-matching 
approach accordingly:

renamed: *#1216 filter operator for "list contains any or all items of 
another list"*
https://github.com/Jermolene/TiddlyWiki5/issues/1216

Best wishes,

— tb 

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/67f9d64c-69ce-41ef-84b4-4465814ae891%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 list filter that returns tiddlers with both of two tags

2015-10-29 Thread Matabele
Hi Tobias

Perhaps this should be generalised for any list (not only the tags field.) 
As in, list all tiddlers that contain any of the items specified, in the 
targeted list.

The syntax for this becomes problematic, as both the reference pointing to 
the field being targeted and the array of items to search for must be 
passed. One option is to first specify the list by way of a filter, then 
search that list for the items in a referenced array:

"[[prefilter[]] +[listhas:{mylist!!ofitems}]"

The other is to first set up the list of items to search for, then specify 
the reference pointing to the list to be search (perhaps by generalising 
the tagging[] operator):

"[[my list]] [[of items]] +[tagging{my!!list}]"

Would either of these address your original usage case?

regards

On Thursday, 29 October 2015 15:42:38 UTC+2, Tobias Beer wrote:
>
> Hi Rustem,
>
> One thing that may be helpful at some point is this.
>
> Consider a tiddler called *action* to which action tags are tagging, e.g.
> *#future*, *#next*, *#waiting*, #*done*... and then there are tiddlers 
> that tag to those individual status tags.
>
> This can already be done using:
>
> {{{ [[action]tagging[]tagging[]] }}}
>
> ...returns only tiddlers that have any action-status tag. Not sure how to 
> do negation on that one.
>
> Anyhow, there is a ticket I once opened for tag-any and tag-all:
>
>
> *#1216 tagged any, tagged all*
>
> https://github.com/Jermolene/TiddlyWiki5/issues/1216
>
>
> What do you think about my last comment there 
> 
> ?
>
>
> Best wishes,
>
>
> — tb
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/59e822e8-5726-4890-b0e3-67954fbc412e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 list filter that returns tiddlers with both of two tags

2015-10-29 Thread Tobias Beer
Hi Rustem,

One thing that may be helpful at some point is this.

Consider a tiddler called *action* to which action tags are tagging, e.g.
*#future*, *#next*, *#waiting*, *done*... and then there are tiddlers that 
tag to those individual status tags.

This can already be done using:

{{{ [[action]tagging[]tagging[]] }}}

...returns only tiddlers that have any action-status tag.


Best wishes,


— tb

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e1067db7-095a-4df9-92da-4c409ad9abc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 list filter that returns tiddlers with both of two tags

2015-10-29 Thread Tobias Beer
Ah, must've been too late to not overlook that double negation. :D

Best wishes,

— tb

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/02305a9a-24a4-432d-82b2-f7fb0242a5af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 list filter that returns tiddlers with both of two tags

2015-10-29 Thread Rustem
Matabele's way works. Thanks everyone.

On Wednesday, October 28, 2015 at 10:07:59 PM UTC-7, Tobias Beer wrote:
>
> Hi Rustem, 
>
>> My “prefilter” is rather complex, I’d like to avoid repeating it unless 
>> there is no other way.
>>
> I think your only option to streamline might be to use a macro(/variable)
> into which you stuff your prefilter so as to not repeat it:
>
> \define fx(pre, a, b, post) [$pre$$a$] [$pre$$b$] $post$
>
> <$list filter=< "+[sort[title]]">>/>
>
> Best wishes,
>
> — tb
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/420bb2b3-ff91-4766-97c1-2ac81c8f4eb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 list filter that returns tiddlers with both of two tags

2015-10-28 Thread Tobias Beer
Hi Rustem, 

> My “prefilter” is rather complex, I’d like to avoid repeating it unless 
> there is no other way.
>
I think your only option to streamline might be to use a macro(/variable)
into which you stuff your prefilter so as to not repeat it:

\define fx(prefilter, a, b) [$prefilter$$a$] [$prefilter$$b$]

<$list filter=<>/>

Best wishes,

— tb

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3a86583b-66da-47e8-a826-64d972c674b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 list filter that returns tiddlers with both of two tags

2015-10-28 Thread Matabele
Hi

This logic should work but I haven't tested this in TW -- remove all items 
from the prefiltered list that are not tagged x and not tagged y
 
[prefilter[]] -[!tag[x]!tag[y]] 

regards

On Thursday, 29 October 2015 03:27:40 UTC+2, Rustem wrote:
>
> [tag[x]] [tag[y]] --> all tiddlers tagged either x or y
>>
> (Old thread, I know, but …) How do I filter SOME tiddlers tagged either x 
> or y?
>
> Two runs separated by a space, as shown above, both take the list of all 
> tiddlers as their input.
>
> But what if I want to pre-filter on some other criteria first, and then 
> return only those of the pre-filtered that are tagged either x or y?
>
> Is this the only way:
>
> [prefilter[]tag[x]] [prefilter[]tag[y]]
>
> My “prefilter” is rather complex, I’d like to avoid repeating it unless 
> there is no other way.
>
> Thanks!
>
> —R
> ​
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/522ca534-f32d-450f-a41f-2bce6a853f9b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 list filter that returns tiddlers with both of two tags

2015-10-28 Thread Rustem

>
> [tag[x]] [tag[y]] --> all tiddlers tagged either x or y
>

(Old thread, I know, but ...)  How do I filter SOME tiddlers tagged either 
x or y?

Two runs separated by a space, as shown above, both take the list of all 
tiddlers as their input.

But what if I want to pre-filter on some other criteria first, and then 
return only those of the pre-filtered that are tagged either x or y?

Is this the only way:
```
[prefilter[]tag[x]] [prefilter[]tag[y]]
```
My "prefilter" is rather complex, I'd like to avoid repeating it unless 
there is no other way.

Thanks!

--R

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/acb1ba6f-34ec-49d7-beef-9300b9e89223%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] TW5 list filter that returns tiddlers with both of two tags

2014-01-01 Thread David Gifford
Thanks guys!

Dave


On Wed, Jan 1, 2014 at 1:38 PM, Jeremy Ruston wrote:

> Hi Dave
>
> I've added some more examples:
>
>
> https://github.com/Jermolene/TiddlyWiki5/commit/4289367b7f9f0c9fa7ce8b974408053bed2b6a4b
>
> The short answer:
>
> [tag[x]tag[y]] --> all tiddlers tagged with both x and y
>
> [tag[x]] [tag[y]] --> all tiddlers tagged either x or y
>
> Best wishes
>
> Jeremy
>
>
>
> On Wed, Jan 1, 2014 at 6:16 PM, David Gifford  wrote:
>
>> Hi
>>
>> I think the TiddlerFilters tiddler needs an example of how to list
>> tiddlers that are tagged with both x and y. All the examples, that I can
>> see, return tiddlers tagged either x or y or both. But I would like to
>> limit filtering to tiddlers tagged both x and y.
>>
>> Dave
>>
>> --
>> 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 tiddlywiki+unsubscr...@googlegroups.com.
>>
>> To post to this group, send email to tiddlywiki@googlegroups.com.
>> Visit this group at http://groups.google.com/group/tiddlywiki.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> Jeremy Ruston
> mailto:jeremy.rus...@gmail.com
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "TiddlyWiki" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/tiddlywiki/hpPGVORx8UQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> tiddlywiki+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
David Gifford
Christian Reformed World Missions, Mexico City

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [tw] TW5 list filter that returns tiddlers with both of two tags

2014-01-01 Thread Jeremy Ruston
Hi Dave

I've added some more examples:

https://github.com/Jermolene/TiddlyWiki5/commit/4289367b7f9f0c9fa7ce8b974408053bed2b6a4b

The short answer:

[tag[x]tag[y]] --> all tiddlers tagged with both x and y

[tag[x]] [tag[y]] --> all tiddlers tagged either x or y

Best wishes

Jeremy



On Wed, Jan 1, 2014 at 6:16 PM, David Gifford  wrote:

> Hi
>
> I think the TiddlerFilters tiddler needs an example of how to list
> tiddlers that are tagged with both x and y. All the examples, that I can
> see, return tiddlers tagged either x or y or both. But I would like to
> limit filtering to tiddlers tagged both x and y.
>
> Dave
>
> --
> 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 tiddlywiki+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.


[tw] TW5 list filter that returns tiddlers with both of two tags

2014-01-01 Thread David Gifford
Hi 

I think the TiddlerFilters tiddler needs an example of how to list tiddlers 
that are tagged with both x and y. All the examples, that I can see, return 
tiddlers tagged either x or y or both. But I would like to limit filtering 
to tiddlers tagged both x and y.

Dave

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.