A few notes: 1) Macros always have to be at the top of the file, before any WikiText.
2) The syntax $(variable)$ only applies inside macros. Outside macros, use <<variable>>. 3) Your trick isn't working because there's no way to *render* WikiText into a filter expression. Basically, the code inside <<myList>> doesn't get executed if it's passed to an attribute like <$list filter=<<mylist>> >. I've just opened a topic suggesting a feature which would make this possible: read here <https://groups.google.com/d/topic/tiddlywiki/E_JbL_5TGyY/discussion>. That said, it's likely there are other ways to solve your problem which don't involve composing an intermediate list. On Saturday, 12 September 2015 05:42:35 UTC-5, Linus Johnsson wrote: > > Thank you for your kind replies. Both suggestions rendered brackets just > fine. As you seem to have anticipated, this immediately landed me in a > different kind of problem. I defined the following macro: > > \define listDescendants(tag) > <$list filter="[tag[$tag$]tag[concepts]]"> > [[<$view field="title" />]] > <$macrocall $name="listDescendants" tag=<<currentTiddler>> /> > </$list> > \end > > The macro works as intended. I do not understand, however, why the > following (trivial) examples will not reproduce the list returned by the > macro. I need to get this to work in order before I add filter runs. First, > > <$set name="myList" value=<<listDescendants "NameOfConceptTiddler">> > > <$list filter=<<myList>> /> > </$set> > > returns the macro code itself, with the spaces between the tokens removed. > As for my second attempt, > > <$set name="myList" value=<<listDescendants "NameOfConceptTiddler">> > > <$list filter="$(myList)$" /> > </$set> > > it just returns "$(myList)$". > > Wrapping the calling code in a macro does not work either: > > \define myMacro > <$set name="myList" value=<<listDescendants "NameOfConceptTiddler">> > > <$list filter=$(myList)$ /> > </$set> > \end > > <<myMacro>> > > All I get is "\define myMacro $(myList)$ \end". > > I am thoroughly confused. Obviously there is something about the syntax > that I have not yet grasped. Please enlighten me! > > Best regards, > Linus > > > 2015-09-11 4:02 GMT+02:00 'c pa' via TiddlyWiki <tiddl...@googlegroups.com > <javascript:>>: > >> Linus, >> >> Ahhh, the old create a list and then parse it trick. I have done that >> before. I think what I ended up doing is storing the list in a temporary >> tiddler's list and then parsing that list to get the results >> >> You can use [ and ] to create square brackets >> >> So something like [[<$view field="title"/>]] will create >> the title >> >> >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "TiddlyWiki" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/tiddlywiki/XH4tgLlr7fY/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> tiddlywiki+...@googlegroups.com <javascript:>. >> To post to this group, send email to tiddl...@googlegroups.com >> <javascript:>. >> Visit this group at http://groups.google.com/group/tiddlywiki. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/tiddlywiki/c052b929-6b6b-492d-8b75-0bdf2df6b3d9%40googlegroups.com >> >> <https://groups.google.com/d/msgid/tiddlywiki/c052b929-6b6b-492d-8b75-0bdf2df6b3d9%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/3e9b1041-7721-479d-96f3-a7e9eb4c7930%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.