Saq, your example should be added to the "Filter Run Prefix (Examples)" 
tiddler of the doc.

Jeremy's is the best answer, but clearly both are convincing enough that 
the UI is about right today. And yes I was aware I could have a pablic 
macro help me, but that would not be very neat or a bit of hassle to setup 
and get rid of after use.
Le mardi 4 mai 2021 à 09:56:30 UTC+2, saq.i...@gmail.com a écrit :

> [all[tiddlers]] :filter[get[type]match[application/javascript]]
>
>
> On Tuesday, May 4, 2021 at 9:42:30 AM UTC+2 jn.pierr...@gmail.com wrote:
>
>> Today I wanted to see which tiddlers I have that are javascript.
>>
>> In advanced research i can execute something like
>>
>> [get[type]match[application/javascript]]
>>
>> but it would only bring "application/javascript"
>>
>> I can't have [filter[get[type]match[application/javascript]]]
>>
>> because this is gross syntax error.
>>
>> But if I had access to another input ext for a macro to be called extra I 
>> could do
>>
>> extra : [get[type]match[application/javascript]]
>> research : filter<extra>sortan[]
>>
>> and the job would be done.
>>
>> BTW, I think a standard "nop" macro doing nothing would be useful. I'm 
>> using it many times when I have to decide for an eventual treatment, for 
>> (actual real) instance:
>>
>> \define deleteProjectNewAltjson(target id)
>> <$action-log $$message="delete project «$target$##$id$»"/>
>> <$action-deletefield $tiddler="$target$" $field="$id$"/>
>> <$set name=next-step 
>> filter="[<target>getindex<id>]then[_kludge4deleteProjectNewAltjson]else[nop]]">
>> <<next-step "$target$" "$id$">>
>> </$set>
>> <$action-log $$message="deleted project «$target$##$id$»"/>
>> \end
>>
>> (this concerns a potential bug for impossibility to delete a property of 
>> first level within a json object tiddler -- there is a separate thread I 
>> fielded yesterday for that)
>>
>> I have not seen any other way to have a conditional call to a macro.
>>
>> regards,
>>
>> -- 
>> Jean-Pierre
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2e7fc87c-f13b-4a6a-ae50-32104d810078n%40googlegroups.com.

Reply via email to