Hello, Eric Schulte <schulte.e...@gmail.com> writes:
> Nicolas Goaziou <n.goaz...@gmail.com> writes: >> In fact, they are already mandatory. The problem is different. Current >> regexp is: >> >> >> "\\([^\n]*?\\)call_\\([^()\n]+?\\)\\(\\[\\(.*?\\)\\]\\|\\(\\)\\)(\\([^\n]*?\\))\\(\\[\\(.*?\\)\\]\\)?" >> >> In particular, name is \\([^()\n]+?\\), and can include whitespace >> characters. Therefore "call_name (args)" is valid. Isn't it too much >> permissive in the context of an Org (i.e. textual) document? >> >> Also, couldn't we limit names to alphanumeric characters and, maybe, >> some puctuation (e.g. hypen)? >> > > Why don't we exclude whitespace from names. Do you think that would be > sufficient? It would solve the current problem, but there are still many problematic characters allowed (e.g., commas, curly brackets). I think there's no point in allowing "call_{i=1}()" as a valid inline Babel call. Furthermore, I don't think it's a real limitation to use alphanumeric characters (and hyphen) only for a function name. I would even require an alphabetic character as the first char, to avoid calls like: "call_1()". BTW, later in that regexp, there is a dubious "(\\([^\n]*?\\))". Is there any reason not to use "(\\(.*?\\))" instead? Also, what about the empty matcher "\\(\\)"? I don't get its use. Regards, -- Nicolas Goaziou