[Idea] Provide the ability to pass the current value in a filter as a parameter to a macro "pipe" #6890
AnthonyMuscio
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As discussed here The format Operator and prior to that #5073 It has dawned on me that if we could pipe the intermediate values in a filter, to a macro in the filter, it would provide powerful functionality.
In effect I wonder if we could create a pipe operator which would pass the current filter value into a macro using a named parameter as described below;
...pipe:paramname<macroname otherparam:"value">....
macroname
filter-value
for which the macroname would need to include in its definition to make use of it....pipe<macroname>....
Below is from my talk.tiddlywiki.org post
Actually with the fact we can now use parameters in macros, within filters and the possibilities of defining our own operators with "Parametrised transclusions" on the horizon this is only getting easier to do.
I see that I had shared a macro to do "number formatting" on 24 Nov 2020
However a question that arises is;
eg "
[all[current]get[amount]<format-number p:3>]
"or if necessary
[all[current]get[amount]pipe:n<format-number p:3>]
format number with 3 places.where a new pipe operator names the parameter to use, in this case "n"
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions