Hi Joe

As you've discovered macro calls don't nest. It's intentional: for the 
shorthand syntax we prefer conciseness over flexibility.

<<macroname param-one:"alpha" param-two:"beta">>

is actually sugar for

<$macrocall $name="macroname" param-one="alpha" param-two="beta"/>

With the full widget syntax you can then do things like this:

<$macrocall $name="macroname" param-one=<<my-other-macro "something">> 
param-two="beta"/>

If you want to pass the wikified output of one macro to another then you'd need 
to use the wikify widget.

Best wishes

Jeremy


--
Jeremy Ruston
[email protected]
https://jermolene.com

> On 19 Jan 2019, at 19:59, Joe Armstrong <[email protected]> wrote:
> 
> 
> I have two macros 
> 
> \define text()
> A line of text
> \end
> 
> \define foo(x)
> fooStart $x$ fooStop
> \end
> 
> So
> 
> <<text>> is replaced by  "A line of text"
> 
> and 
> 
> <<foo "abc">> is replaced by "Start abc fooStop"
> 
> But <<foo <<text>> >>
> 
> is replaced by "fooStart <<text fooStop >>"
> 
> And NOT "fooStart A line of text fooStop" as I had expected.
> 
> After a lot of head scratching I realised that this means that the argument 
> (x) to foo is the
> string "<<text" ie the first occurrence of ">>" to the left
> of the start "<<" of the macro and not the second occurrence. 
> 
> ie. "<<" and ">>" do not properly nest as I had expected.
> 
> This seems like a pretty big pothole for a beginner to fall into ...
> 
> So what is the accepted idiom for using a macro result
> as the input argument to another macro - how does one chain macro calls 
> together?
> 
> Cheers
> 
> /Joe
> 
> -- 
> 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 https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/2f55a6b2-cf48-4550-94f6-4b0955bc5d5c%40googlegroups.com.
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/FC34004E-5233-4761-B821-AE9718AEB2EF%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to