Hi Måns,

I suspect the only way to achieve this at present is to use a JavaScript 
macro.

You can generate the desired string via *<$list 
filter="[list[ThisTiddler!!listfield]]">{{!!title}} </$list>*. And if you 
define a macro *m* with that as its value, you can then say *<$macrocall 
$name="m" $output="text/plain"/>* to obtain the string as plain text.

But you can't pass a macrocall widget as an argument to a macro, i.e. you 
*can't* say:

*<$macrocall $name="sentences" category="All items" sentences=<$macrocall 
$name="m" $output="text/plain"/>/>*

This is because you can't pass one widget as an attribute to another.

It would be brilliant if the macrocall widget provided a way to assign its 
result to a specified variable. You'd then be able say things like this:


*<$macrocall $name="m" $output="text/plain" $variable="sentences">*
*<$macrocall $name="sentences" category="All items" 
sentences=<<sentences>>/>*
*</$macrocall>*

I can think of lots of places where that would be extremely useful.

The set widget has a filter option which almost does what you want:

*<$set name="sentences" filter=*
*"[list[ThisTiddler!!listfield]]">*
*<$macrocall $name="sentences" category="All items" 
sentences=<<sentences>>/>*

*</$set>*

But it has the side effect of wrapping double square brackets round any 
items that contain spaces, which rather defeats the point here.

It would be nice if there was a *join* filter operator for performing 
concatenation (with a separator as its parameter), so you could say this:

*<$set name="sentences" filter=**"[list[ThisTiddler!!listfield]join[ ]]">*
*<$macrocall $name="sentences" category="All items" 
sentences=<<sentences>>/>*
*</$set>*

– æ

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to