a typo in my code : theme3=<<<theme3>> instead of theme3=<<theme3>>
with that fix, I can see theme3 as a simple text, "thème 5" in the result 
line beginning by bag=

as for the code with removeprefix, it works OK in an other tiddler. But 
here, it keeps being dizzy. the tiddler types are all set to tw5. any idea 
to spot the cause of this?

Le mercredi 2 décembre 2020 à 11:36:18 UTC+1, Jean-Pierre Rivière a écrit :

> @Eric. Tahnk you! It does the trick but... not so much as I wanted. see 
> the output I get:
>
> [image: unwanted-link.png]
>
> "thème 5" is indeed the tittle of an existing tiddler.
>
> What I am looking for is only the text "thème 5", not the link to "thème 
> 5".
>
> Now, I know how to use $wikify to acieve that goal with the current 
> linking result. But what I don't understand is why I got this linking in 
> the first place!
>
> my code (same as yours):
>
> \define itemlist2(tag:"thème", field:"theme", excluding)
> <$set name="rejecting" 
> filter="[[$excluding$]!match[]then[$excluding$]else[$tag$]]">
> tag=$tag$, field=$field$, excluding=$excluding$, rejecting=<<rejecting>>.
> </$set>
> \end
>
> and my using that code (to get the picture above) in tiddler "choix des 
> critères du thème 5"
>
> <$set name=beg value="choix des critères du ">
> <$set name=theme2 filter="[{!!title}removeprefix<beg>]">
> <$wikify name=theme3 text="<<theme2>>">
> <$wikify name="theme-label" text="""<$transclude tiddler=<<theme3>> 
> field=theme/>""">
> beg=<<beg>> theme2=<<theme2>> theme3=<<<theme3>> 
> theme-label=<<theme-label>><br>
> <$macrocall $name=itemlist2 tag=<<theme-label>> field=criterion 
> excluding=<<theme3>>/>
> </$wikify></$wikify>
> </$set></$set>
>
> And I get also this line:
>
> [image: unwanted-link2.png]
>
> (where I neither understand why theme2 is a link and theme3 is void)
>
>
> Le mardi 1 décembre 2020 à 21:24:39 UTC+1, Eric Shulman a écrit :
>
>> On Tuesday, December 1, 2020 at 12:09:38 PM UTC-8 jn.pierr...@gmail.com 
>> wrote:
>>
>>> I am writing a macro with three parameters. If omitted, the third shall 
>>> be equal to the first one. This cannot be hardwired of course! So I need to 
>>> code it. With a filter.
>>
>> \define itemlist2(tag:"thème", field:"theme", excluding)
>>> <$set name="rejecting" filter="[$excluding$]+[regexp[^.]then[YES 
>>> $excluding$]else[NO $tag$]]">
>>> tag=$tag$, field=$field$, excluding=$excluding$, 
>>> rejecting=<<rejecting>>.<br>
>>> </$set>
>>> \end
>>>
>>
>> Try using the !match[...] filter, like this:
>> \define itemlist2(tag:"thème", field:"theme", excluding)
>> <$set name="rejecting" filter="[[$excluding$]!match[]then[$excluding
>> $]else[$tag$]]">
>> tag=$tag$, field=$field$, excluding=$excluding$, 
>> rejecting=<<rejecting>>.<br>
>> </$set>
>> \end
>>
>> -e
>>
>

-- 
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/e49e4ed1-c2cd-4ec8-8bbf-890277bb15a2n%40googlegroups.com.

Reply via email to