Hi Mohammad The reason the content of Test01 displays differently in the tiddler “Tabs Macro Example” is because the current tiddler is “Tabs Macro Example”, which is inherited by the transcluded content of Test01. When displaying Test01 on its own the current tiddler will be “Test01”.
In other words, the tabs macro is a red herring. If you copy and paste the content of Test01 directly into “Tabs Macro Example” you’ll see the same output. Best wishes Jeremy. > On 6 Oct 2019, at 17:22, Mohammad <[email protected]> wrote: > > Hi Jeremy, > Sorry for my bad English composition! > > I have created an example > > http://hirad.tiddlyspot.com/#Tabs%20Macro%20Example:%5B%5BTabs%20Macro%20Example%5D%5D%20Test01%20macro%2Fcode-link > > <http://hirad.tiddlyspot.com/#Tabs%20Macro%20Example:%5B%5BTabs%20Macro%20Example%5D%5D%20Test01%20macro%2Fcode-link> > > > look at what tiddler Test01 displays when it is opened by itself and when it > is opened inside tabs! > > Here Test01 calls a user defined macro (code-link) to show the raw text > (code) of a tiddler. > > The macro code-link uses the variable currentTiddler. > > This currentTiddler shows different results in different situation. > > I have used red color to highlight the difference. > > --Mohammad > > > > On Sunday, October 6, 2019 at 4:56:46 PM UTC+3:30, Jeremy Ruston wrote: > Hi Mohammad > > I’m afraid I'm not quite following. The tabs macro intentionally doesn’t > affect the current tiddler. > > Best wishes > > Jeremy > >> When you use a tiddler with tabs macro Tiddlywiki refers to currentTiddler >> to the last tiddler in which rendering is occurred! >> >> This make macros with currentTiddler as input parameter break and work >> wrongly! >> >> Isn't it better to remove this from tabs macro? >> >> Example >> see this macro >> >> \define code-link(tiddler) >> <$set name=selected-tiddler value="$tiddler$" emptyValue=<<currentTiddler>> > >> <$link to=<<selected-tiddler>>/> >> <$codeblock language={{{[<selected-tiddler>get[type]]}}} >> code={{{[<selected-tiddler>get[text]]}}}/> >> </$set> >> \end >> >> >> >> >> Use it inside a tiddler say myTiddler tagged demo with no input parameter! >> >> Now in another tiddler put the below script >> >> <<tabs tabsList:"[tag[demo]]" class:"tc-vertical">> >> >> You will see wrong result! >> >> >> --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 tiddl...@ <>googlegroups.com <http://googlegroups.com/>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/tiddlywiki/231b0bef-7553-4a5b-9a58-5d3c08e6b2b4%40googlegroups.com >> >> <https://groups.google.com/d/msgid/tiddlywiki/231b0bef-7553-4a5b-9a58-5d3c08e6b2b4%40googlegroups.com?utm_medium=email&utm_source=footer>. > > > -- > 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] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywiki/72ca2338-266e-4cb8-84fd-94875c34eeaa%40googlegroups.com > > <https://groups.google.com/d/msgid/tiddlywiki/72ca2338-266e-4cb8-84fd-94875c34eeaa%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/29DD84C3-94D2-48AF-851D-5E64C7D14125%40gmail.com.

