Ah, that explains it! It works as expected now. Many thanks! I read about those triple quotes in "Macro Calls in WikiText", but I didn't realise that formal parameters (is that the correct term for the $parameter$ construct?) in the macro definition could be enclosed as well, not just parameter values (arguments?) on the "calling" side. Perhaps adding an example of is to "Macro Definitions in WikiText" would be helpful? Best regards, Linus
On sön, maj 31, 2015 at 2:48 em, [email protected] <[email protected]> wrote: Hi Linus opens the tiddlers "Test1" and "Test2" as expected. However, when the filter is parameterized as follows: \define openTiddlers(tf) <$button> <$list filter=$tf$> <$action-navigate $to={{!!title}}/> </$list> Open tiddlers </$button> \end The $param$ and $(var)$ syntax results in a textual substitution that is performed on the macro contents before it is parsed. The problem here is that the textual substitution occurs literally, so if you pass a value that contains spaces you'll get something like this: <$list filter=one two three> So, the solution is to include quotes: <$list filter="""$tf$"""> By using triple double quotes we ensure that filters that contain single or double double quotes will work correctly. Best wishes Jeremy. <<openTiddlers "Test1 Test2">> only "Test1" is opened. Variations such as <<openTiddlers "[[Test1]] [[Test2]]">> and <<openTiddlers """Test1 Test2""">> don't work either. I tried to add parentheses around the parameter: \define openTiddlers(tf) <$button> <$list filter=$(tf)$> <$action-navigate $to={{!!title}}/> </$list> Open tiddlers </$button> \end which strangely enough opens the tiddler "true". (Why would "$(tf)$" evaluate to "true"?) Even worse, when I try to use instead angle brackets: \define openTiddlers(tf) <$button> <$list filter=<<tf>> > <$action-navigate $to={{!!title}}/> </$list> Open tiddlers </$button> \end seemingly every single tiddler in the Wiki is opened, and eventually it crashes completely. Could anyone give me a hint as to what I'm doing wrong? I would also greatly appreciate an explanation of what is going on here, since I evidently don't grasp the WikiText semantics yet. Best regards, Linus -- 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] [[email protected]] . To post to this group, send email to [email protected] [[email protected]] . Visit this group at http://groups.google.com/group/tiddlywiki [http://groups.google.com/group/tiddlywiki] . To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/28276197-2738-4e21-9300-f658364993ce%40googlegroups.com [https://groups.google.com/d/msgid/tiddlywiki/28276197-2738-4e21-9300-f658364993ce%40googlegroups.com?utm_medium=email&utm_source=footer] . For more options, visit https://groups.google.com/d/optout [https://groups.google.com/d/optout] . -- Jeremy Ruston mailto: [email protected] [[email protected]] -- 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/ShOTV6i1j8Y/unsubscribe [https://groups.google.com/d/topic/tiddlywiki/ShOTV6i1j8Y/unsubscribe] . To unsubscribe from this group and all its topics, send an email to [email protected] [[email protected]] . To post to this group, send email to [email protected] [[email protected]] . Visit this group at http://groups.google.com/group/tiddlywiki [http://groups.google.com/group/tiddlywiki] . To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CAPKKYJbRBLLyU9x1-kJ7pjX8K_c3G2EjT%2B2dc82JUjt-3AmQsA%40mail.gmail.com [https://groups.google.com/d/msgid/tiddlywiki/CAPKKYJbRBLLyU9x1-kJ7pjX8K_c3G2EjT%2B2dc82JUjt-3AmQsA%40mail.gmail.com?utm_medium=email&utm_source=footer] . For more options, visit https://groups.google.com/d/optout [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 [email protected]. To post to this group, send email to [email protected]. 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/1433084142553-12cad01f-9bb54e11-e1b08a60%40gmail.com. For more options, visit https://groups.google.com/d/optout.

