Mohammad, I am not so clear on what is wrong, or are you saying nothing is when you expect it to break?
In both cases the "currentTiddler" is being changed (listed) in the List widget. So in both cases the macro will be operating with each value of current tiddler as a result of the list. As a result both <<currentTiddler>> and $(currentTiddler)$ are the same value. I don't think these will vary from each other so often, in the case of currentTiddler which is dynamically generated. However if you used another variable in the below example you should see what I mean. \define myMac1() $(currentTiddler)$ \define myMac2() <<currentTiddler>> \define myMac3() <<currentTiddler>><br> `<<another-variable>>`: <<another-variable>><br> `$ (another-variable) $` $( another-variable)$<br> <$set name=another-variable value="I have changed another-variable "> After changing varable `<<another-variable>>`: <<another-variable>><br> `$ (another-variable) $` "$(another-variable)$" but this remains the same<br> </$set> \end \define myMac4() <<currentTiddler>><br> `<<another-variable>>`: <<another-variable>><br> `$ (another-variable) $` $(another-variable)$<br> \end <$set name=another-variable value="See what I mean"> <$list filter="[tag[HelloThere]]"> currentTiddler: <<currentTiddler>><br> myMac1: <<myMac1>><br> myMac2: <<myMac2>><br> myMac3: <<myMac3>><br> myMac4: <<myMac4>><br> <hr> </$list> </$set> Regards Tony On Friday, February 8, 2019 at 5:42:49 PM UTC+11, Mohammad wrote: > > Assume you have a macro in a global tiddler e.g > > > Title: MyMacro > Tag: $:/tags/Macro > > > \define myMac() <<currentTiddler>> > > > > Then in another tiddler you call the myMac macro as below > > <$list filter="[tag[HelloThere]]"> > <<myMac>><br> > </$list> > > > and testing on Tiddlywiki.com produces > > A Gentle Guide to TiddlyWiki > <https://tiddlywiki.com/prerelease/#TiddlyWiki> > Discover TiddlyWiki <https://tiddlywiki.com/prerelease/#TiddlyWiki> > Some of the things you can do with TiddlyWiki > <https://tiddlywiki.com/prerelease/#TiddlyWiki> > Ten reasons to switch to TiddlyWiki > <https://tiddlywiki.com/prerelease/#TiddlyWiki> > Examples > What happened to the original TiddlyWiki > <https://tiddlywiki.com/prerelease/#TiddlyWiki>? > > As we learned with the scope of variable and variable inside macro I > expect the above syntax fails and the below syntax works > > Title: MyMacro > Tag: $:/tags/Macro > > > \define myMac() $(currentTiddler)$ > > > > As we know a variable from ouside macro should be referenced as > $(varname)$. > > So what is going on here? > > --Mohammad > > -- 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/7abb209a-f839-4913-99e8-9a7248b70eeb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

