On Sunday, July 1, 2018 at 7:22:20 AM UTC-7, Mohammad wrote:
>
> The case is how can I have myMac available globally (can be invoked from 
> any tiddlers) but smac1 and smac2 remain private!
>

1) put myMac() in a tiddler tagged with $:/tags/Macro
2) put smac1() and smac2() in another tiddler tagged with "SomeTag" (e.g., 
"MyMacroFunctions")

in the definition of myMac(), write:

\define myMac(x,y)
<$includevariables filter="[tag[MyMacroFunctions]]">
<<smac1 $x$>> <<smac2 $y$>>
</$includevariables>
\end

The <$includevariables> widget pulls in all the variables (i.e., macro 
definitions) contained in the tiddlers matching the specified filter.

Note that, if you only want to include variables from one specific tiddler, 
then you don't need to use a tag... you can just specify the name of the 
tiddler as the filter:
<$includevariables filter="smacFunctions">

enjoy,
-e

-- 
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/109e36db-a8a1-4276-a6a9-43949e9dd6fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to