codaCoda,

I have updated the content of "&" to return text only
<$text text={{{ [all[current]split[ ]] +[join[]] }}}/>

*Important guidance* is 

   - the "filter" given to the transclusion needs each value to be treated 
   as a title hence 
      - $:/string/ [<var>] / [{!!fieldname}] [[/suffix/]] [all[current]]
      - except for literals without white space, we need to wrap it in at 
      least one [ ]
   

I think typically we are forced to use wikify still rather than set or vars 
to get such variables to operate in a filter.
<$set name=ghost-tiddler value={{{ $:/ghost/ [all[current]] || & }}}>
<$link to=<<ghost-tiddler>>/>
<$list filter="[<ghost-tiddler>has[title]]" emptyMessage="No ghost">
Ghost tiddler <<ghost-tiddler>> exists
</$list>
</$set>

This does just not result in <<ghost-tiddler>> "$:/ghost/*currentTiddler*"

I have raised this issue 
<https://github.com/Jermolene/TiddlyWiki5/issues/5110>, but Saq has an 
argument that wikify is a poor performer.

Regards
Tony
On Thursday, 3 December 2020 at 12:41:51 UTC+11 codacoder...@outlook.com 
wrote:

> Tony - Looks good on  a first pass... I'll need to look at it properly 
> tomorrow (it's late here).
>
> On Wednesday, December 2, 2020 at 6:59:28 PM UTC-6 TonyM wrote:
>
>> And using codaCodas examples prior;
>>
>> <$wikify name=style-value text="""color: {{!!color}}""">
>>  style=<<style-value>> 
>> </$wikify>  
>>
>> <span style={{{ [[color:]] [{!!c}] +[join[]] }}}>Check this in 
>> devtools</span>  
>>
>> <span style={{{ color: [{!!color}] ||&}}}>Check this in devtools</span>  
>>
>> Again great for attribute values and parameters, but still need another 
>> step to get the result into a filter.
>>
>> Tony
>>
>> Tones
>> On Thursday, 3 December 2020 at 11:46:41 UTC+11 TonyM wrote:
>>
>>> Saq et al,
>>>
>>> Thinking a little further on this issue of "inline concatenation of 
>>> various tiddlywiki values", I believe I have just found a quite elegant 
>>> solution.
>>> Given your complaint about Wikification performance this returns the 
>>> "evaluated text"
>>>
>>> Create a tiddler called "&" for concatenate containing
>>> {{{ [<currentTiddler>split[ ]] +[join[]] }}}
>>>
>>> This spits the input by spaces/run and then joins them.
>>>
>>> Now to concatenate use;
>>> {{{ filter || & }} 
>>> {{{ filter-run filter-run ||&}}
>>>
>>> Where filter can access any value available to a filter, use space 
>>> separation of runs
>>> {{{ $:/string/ [<var>] / [{!!fieldname}] [[/suffix]] ||&}}} 
>>> {{{ $:/string/ [<var>] / [{!!fieldname}] [[/suffix/]] [all[current]] 
>>> ||&}}}
>>> {{{ $:/system/ [<currentTiddler>] ||&}}
>>>
>>> Now I am already taking this code pattern further, 
>>>
>>>    - This allows the concatenation of values passed as a parameter/set 
>>>    of filters
>>>    - but for efficient use I know need to determine the best way to get 
>>>    a result into a filter. I expect we must use set or vars.
>>>    
>>> Regards
>>> Tony
>>> On Thursday, 3 December 2020 at 04:28:23 UTC+11 saq.i...@gmail.com 
>>> wrote:
>>>
>>>> @codacoder There are issues on github discussing both approaches, using 
>>>> backticks to wikify OR using them to do substitution. I strongly prefer 
>>>> the 
>>>> latter due to the performance penalty associated with wikify.
>>>>
>>>> See
>>>>
>>>>    - https://github.com/Jermolene/TiddlyWiki5/issues/5121
>>>>    - https://github.com/Jermolene/TiddlyWiki5/issues/5110
>>>>
>>>> But let's not derail Tony's thread by going too far off topic. If we 
>>>> want to discuss this further we should start a new thread.
>>>>
>>>> Cheers,
>>>> Saq
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/d7daf9fe-f668-488b-8f65-bcd8dc9806d0n%40googlegroups.com.

Reply via email to