Transclusion is only set by “real” transclusions and not by macrocalls. So it usually reflects the <<thisTiddler>>
variable.
I will add the possibility to define some additional suffixes and parameters to the variables-operator. eg:
[variables:raw:include/exclude[var, fn, proc, def, widget]]
… Similar to the fields-operator
suffix1:
-
sort … default if empty
-
raw … Do not sort the result list. This returns “nearby variables” first. Usually the list is long. So we can use
limit[x]
to shorten the output and still get useful and relevant info
suffix2
-
include (default) … The parameter contains eg:
var, fn, proc, def, widget
. If empty it includes all variables. eg: fn
will only show function definitions.
-
exclude … will exclude the elements listed in the parameter
eg:
-
[variables:raw:include[fn]]
will create a raw list of function names
-
[variables::include[fn]]
will create an alphabetically sorted list of function names
So <<dumpvariables subfilter:"[variables::include[fn]]">>
will only list function names and shows the evaluated value.
I think it would be also interesting to see the function-name, the parameters and the code. I’m not sure yet how this can be achieved.
may be with a second parameter eg:: [variables::include[fn],[template]]
template could be [variables::include[fn],[\function $name$ ($params$) $code$]]
All the elements surrounded with $ will be replaced by real values. \function
and the braces ()
surrounding the params are just template-text.
This configuration should be very similar to the substitute-operator. So the concept already exists.
Just brainstorming
-mario