I haven’t played with space-lua yet but I would expect it’s the same as with space-script function. Once it’s registered, you can call it directly within a template or querry. You only need to put it inside bracket to use it in-line.
From what I can tell that does not work. I don’t think functions are manually registered in Lua. I can register a command (for the command picker), but not a function iiurc.
No you cannot do this and I have little interest in making it work (in the context of Lua, using the template language is legacy). What I envision you do instead is use a Lua expression directive like this (untested, but you get the idea):
Thanks, this works! In my case it’s a bit tricky, because the title can contain square brackets, and I haven’t quite figured out a nice way to escape those. But this answers my question anyway.
To illustrate, if you are interested, I can’t render these as links, because the extra square brackets throws off the renderer: