@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 [email protected] 
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/556fbdc4-5da2-4fdc-833c-fed2ddcd8aa0n%40googlegroups.com.

Reply via email to