Technical Question - add the ability to provide a subfilter to is and all filter operators

19 views
Skip to first unread message

TonyM

unread,
Jan 4, 2019, 12:43:37 AM1/4/19
to TiddlyWikiDev
Folks,

Without developing the reason for this idea, A hopefully quick question.

Would it be possible to enhance the all and is  filter operators such that when the value passed is not one of the fundamental categories is is treated as a subfilter as per the subfilter operator?

Thus one could do this;

\define active-task() [tiddler-type[task]has[item-started]!has[item-completed]!has[item-cancelled]]


and then use a filter such as

<$list filter="[all<active-task>]"> </$list>
Such that it will return all tiddlers matching the macro/filter.

The similar may also be valid for the is operator, but as far as the use of english is concerned could do the following

<$list filter="[is<active-task>]"> </$list>
Such that it will match if the CurrentTiddler matches the <active-task> filter.

This would in effect expand the filter to 
[all[current]<active-task>

And perhaps to make has[draft.of] only needed in exceptional cases

[all[current]!has[draft.of]<active-task>

As far as I can see this should all be backwards compatible however along with the subfilter operator it now permit named filters to be used in all key cases of using filters.

Regards
Tony




Reply all
Reply to author
Forward
0 new messages