As a final reply to this post, I can now show you a working solution,
complete within my project: elaborating a glossary entry for French.
\define all-initials()
<$list filter="[tag[glossaire]]">
<$set name=1st value={{{ [all[current]split[]first[]] }}}>
<<1st>>
</$set>
</$list>
\end
\define glossaryList()
<$wikify name="all-letters" text=<<all-initials>>>
<$list
filter="[<all-letters>uppercase[]split[É]join[E]split[]each:value[]!is[missing]]"
variable="letter">
<$link to=<<letter>>/>
</$list>
<$list
filter="[<all-letters>uppercase[]split[É]join[E]split[]each:value[]!is[missing]]"
variable="letter">
<h3><$link to=<<letter>>/></h3>
<$set name="entries" filter="[<letter>addprefix[{{]addsuffix[}}]]">
<<entries>>
</$set>
</$list>
</$wikify>
\end
A bit of conundrum yet: I have been required to duplicated the $list
filter="[<all-letters>uppercase[]split[É]join[E]split[]each:value[]!is[missing]]"
variable="letter"> because I have not been able to use its results one way
or another (wikify, variable... no way).
But the things that really was strange is that I could not transclude the
tidler of any given letter (like "A" or "M") with
<$transclude tiddler=<<letter>>/>
because its transclude all the letters instead (and not even that, because
the E was missing entries beginning by "é" which the real "E" tiddler has).
And the only working way to generate the {{<<letter>>}} syntax that would
work was through the filter of a variable. How strange!
This kind of quirks realling make things much slower than what you would
think they have too.
Le dimanche 1 novembre 2020 à 14:34:56 UTC+1, Eric Shulman a écrit :
> On Tuesday, October 27, 2020 at 6:53:17 PM UTC-7, Jean-Pierre Rivière
> wrote:
>>
>> Other than a question of taste, or of giving a meaningful name to a
>> complex filter preceding the get operator in my example, it seems that
>> subfilter has no other intterest, isn't it?
>
>
> As I already noted in a previous reply (
> https://groups.google.com/d/msg/tiddlywiki/2P6G5NtUuWA/A3Be4gWcBgAJ)
>
> ... if you wanted to have different filters based on a field value, you
>> could write:
>> <$set name="F" filter="[{!!setting}match[somevalue]]"
>> value="[somefilter]" emptyValue="[someotherfilter]">
>> <$list filter="[subfilter<F>]"/>
>> </$set>
>> Note in the above example, I've used the "conditional variable
>> assignment" form of $set (see https://tiddlywiki.com/#SetWidget)
>
>
> -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/ed15b543-21a5-4fea-ba2b-4209a8a69af6n%40googlegroups.com.