Macros are more like macros in  make scripts. They don't really do 
anything, but they can concatenate variables or passed values into 
strings.  Variables with <<syntax>> are actually macro expansions. You can 
use macros to feed into widgets like

<$mywidget text=<<myvariable>>/>

Widgets render something right there in place, typically. I don't think you 
can say that they return anything. If you want to evaluate their "return" 
(what you see on screen) you may have to use the Wikify widget to render 
their result into a variable.

There are JS macros, which can do more than regular macros. Most of the 
core macros appear to be regular, non-js, macros.

If you type list-links into the advanced search engine and click on the 
Shadows tab, you'll see

$:/core/macros/list 
<https://tiddlywiki.com/prerelease/#%24%3A%2Fcore%2Fmacros%2Flist> 
$:/language/Snippets/ListByTag 
<https://tiddlywiki.com/prerelease/#%24%3A%2Flanguage%2FSnippets%2FListByTag> 

Clicking on the one with "macros" in the title will take you to the tiddler 
with the list-links definition. This is pretty much how I find stuff when 
I'm rummaging around.

Good luck!
-- Mark

On Saturday, March 10, 2018 at 10:25:48 AM UTC-8, Joe Armstrong wrote:
>
> TW seems to have three types of code: JS functions, TW macros, and TW 
> widgets. It's not clear to me how these are evaluated, 
>
> nor what the order of evaluation is.
>
>
> 1) macros - what are they? How do they differ from regular JS functions - 
> how are they evaluated? 
>
> what do they return? Is the return text re-evaluated?
>
>
> 2) widgets - what do they return? how are they evaluated?
>
>
> 3) How can I find a macro-definition ? 
>
> I looked for ages for the source of the list-links macro but could not 
> find it
>
>
> 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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
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/f65d4edd-19c6-4ac0-a5fb-621a2d2e78c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to