[tw5] Re: macro variable valuation

2021-04-07 Thread Jean-Pierre Rivière
I've checked the view widget. For tge display, it has the same effect as the text widget today if used with "text" format. And if used with "htmlwikified" format, it gives me the html source of what I want to display. Add a wikify widget, and that's it ! (No need for my "codexe" tiddler). The

[tw5] Re: macro variable valuation

2021-04-06 Thread Jean-Pierre Rivière
I've been able to have the link with my latest idea. But it adds an other tiddler, tgat I call codexe. this tiddler has a tw5 type and just transclude the code tiddler. Then my user tiddler transclude codexe. Some code to make things clearer. * tiddler codexe: <$transclude tiddler=code

[tw5] Re: macro variable valuation

2021-04-06 Thread Jean-Pierre Rivière
If I use DEMO: <$text text=<>/> then I get the body of tho demo macro' with the parameters ($dico$ and $index$) replaced by the expressions sent as arguments (not their evaluation). It could be somewhat handy but it was not what was looked for. for the MACRO line, I can't do anything else. I

[tw5] Re: macro variable valuation

2021-04-06 Thread 'Mark S.' via TiddlyWiki
On Tuesday, April 6, 2021 at 8:57:15 AM UTC-7 jn.pierr...@gmail.com wrote: > I tried the text widget thus: > > * DEMO: <$text text="""<>"""/> > * MACRO: <$text text="""<$macrocall $name=demo {{!!dico}} > {{!!index}}/>"""/> > >> >>> You wrapped the arguments in strings, so now it interprets

[tw5] Re: macro variable valuation

2021-04-06 Thread Jean-Pierre Rivière
I tried the text widget thus: * DEMO: <$text text="""<>"""/> * MACRO: <$text text="""<$macrocall $name=demo {{!!dico}} {{!!index}}/>"""/> and I got: - DEMO: <> - MACRO: <$macrocall $name=demo {{!!dico}} {{!!index}}/> I thought that the macrocall parameter were to interpretated before the

[tw5] Re: macro variable valuation

2021-04-06 Thread Jean-Pierre Rivière
Thank you Mark, this is most clear and straightforward. So I've introduced an auxmacro to be sure what I get is what I want: \define auxdemo(dico, index) <$macrocall $name=spacedemo dico=$dico$ index=$index$/> ÇThat way, it will be easier to write my macro. No more ugly surprise. And yes it

[tw5] Re: macro variable valuation

2021-04-06 Thread 'Mark S.' via TiddlyWiki
Macros with << >> syntax do simple text substitution. They look like "functions", but they are really just text substituters (new word). Sometimes AFTER the substitution things will get rendered. So in your expression !!! space demo for "$index$" in "$dico$" [[$dico$]] (not [[$dico$|$index$]])

[tw5] Re: macro variable valuation

2021-04-06 Thread clutterstack
Hi, You've troubleshot it pretty well yourself, and you've run into a big difference between WikiText and the kind of programming you might be used to. To quote the docs , "Macros are in fact just parameterised variables". Things don't get evaluated everywhere