Are some tiddlers exculded from filter operators by default?

61 views
Skip to first unread message

amreus

unread,
Jun 3, 2020, 4:16:11 PM6/3/20
to TiddlyWiki
Just playing around with filters. Why do I get more results when using [all[shadows]prefix[$:/tags]] over [all[]prefix[$:/tags]] or just simply [prefix[$:/tags]] ?

Are some tiddlers excluded from filters by default? 


Eric Shulman

unread,
Jun 3, 2020, 5:50:03 PM6/3/20
to TiddlyWiki
On Wednesday, June 3, 2020 at 1:16:11 PM UTC-7, amreus wrote:
Just playing around with filters. Why do I get more results when using [all[shadows]prefix[$:/tags]] over [all[]prefix[$:/tags]] or just simply [prefix[$:/tags]] ?

Are some tiddlers excluded from filters by default? 

The interpretation of the "all[...]" filter operator is briefly documented here: https://tiddlywiki.com/#all%20Operator

Take note of the following descriptions:

1) all[shadows] - all the shadow tiddlers that exist, including any that have been overridden with non-shadow tiddlers

and

2) As a special case, if the parameter is empty, the output is simply a copy of the input. This can be useful when the parameter is soft.

in case (1), the filter includes all (and only) the shadows defined by the TWCore (a total of 2053 tiddlers at http://tiddlywiki.com)

in case (2), the filter includes all (and only) the *non-shadow* tiddlers (a total of 1330 tiddlers at http://tiddlywiki.com)

Also note that when "all[]" is omitted, the default input for the filter run is *implied* to be all non-shadow tiddlers, thus results of [prefix[$:/tags]] is exactly the same as [all[]prefix[$:/tags]]

enjoy,
-e


amreus

unread,
Jun 4, 2020, 2:52:31 AM6/4/20
to tiddl...@googlegroups.com
Thanks Eric for the clarification.  Most of my question could have been solved by reading more closely. However;


> Also note that when "all[]" is omitted, the default input for the filter run is *implied* to be all non-shadow tiddlers,

Is this documented somewhere?  I found a sentence on this tiddler: https://tiddlywiki.com/#all%20Operator stating "By default, each run considers every tiddler in the wiki." Would it be more correct if it said "every non-shadow tiddler" instead of "every tiddler"?

EDIT: So right at the top of the "FIlter Operators" tiddler in bold it says " Each first step of a filter run not given any input titles receives the output of [all[tiddlers]] as its input." 

It wasn't immediately obvious to me that "filter operators" were not all filters - that there are different functions. For example "all" is a filter op that generates a list and "is" is a filter op that filters a list.

Eric Shulman

unread,
Jun 4, 2020, 4:07:04 AM6/4/20
to TiddlyWiki
On Wednesday, June 3, 2020 at 11:52:31 PM UTC-7, amreus wrote:
It wasn't immediately obvious to me that "filter operators" were not all filters - that there are different functions. For example "all" is a filter op that generates a list and "is" is a filter op that filters a list.

A filter operator that *generates* a list is called a "selection constructor", while a filter operator that *derives its output from its input* is called a "selection modifier".

This is briefly explained here: https://tiddlywiki.com/#Selection%20Constructors.

Only a few filter operators are "selection constructors".

You can see the list of constructors by using $:/AdvancedSearch filter to search for "[tag[Selection Constructors]]".

enjoy,
-e
Reply all
Reply to author
Forward
0 new messages