Open Leilei332 opened 2 weeks ago
It would be sensible to name it procedure
or proc
and allow \procedure
definitions and may be \defines
too.
The most generic way would be transclude[variable],[param1]
and so on. But we already have a transcludes operator so this will be very error prone.
As is described in docs:
Procedure calls can be used in filters. The text is not wikified which again means that the parameters will be ignored.
So it isn't encouraged to use procedure with parameters in filters. IMO the operator should not support macros or procedures defined in tiddlers, it only makes sense to support javascript macros in filters.
Hi @Leilei332 might another possibility be to update the existing function
operator to be able to work with JS macros? At the moment, [function[now]]
is broken.
If we decided to extend the function
operator to support javascript macros, we need to deal with the conflict of functions defined in tiddlers and javascript macros:
Hi @Leilei332 I guess we already have the same conflict between functions and JS macros when using the <<name>>
syntax, so perhaps we can make things consistent.
I think we may add some documention on overriding core javascript macros. (Perhaps the name Javascript macros can be changed to Javascript functions)
Hi @Leilei332 thank you, that is an excellent idea
The current implementation of using macros in filters isn't good enough:
It isn't able to use variables or textreference as a parameter of the macro. I think we had better introduce a macro operator so that variables and textreference can be used as parameter (like the function operator). For example