[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] words starting with call_ confuse C-c C-c and export
From: |
Nicolas Goaziou |
Subject: |
Re: [O] words starting with call_ confuse C-c C-c and export |
Date: |
Sun, 15 Dec 2013 23:43:49 +0100 |
Hello,
Eric Schulte <address@hidden> writes:
> Nicolas Goaziou <address@hidden> 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
- [O] words starting with call_ confuse C-c C-c and export, Daniel Clemente, 2013/12/03
- Re: [O] words starting with call_ confuse C-c C-c and export, Nicolas Goaziou, 2013/12/03
- Re: [O] words starting with call_ confuse C-c C-c and export, Eric Schulte, 2013/12/06
- Re: [O] words starting with call_ confuse C-c C-c and export, Nicolas Goaziou, 2013/12/06
- Re: [O] words starting with call_ confuse C-c C-c and export, Eric Schulte, 2013/12/06
- Re: [O] words starting with call_ confuse C-c C-c and export, Nicolas Goaziou, 2013/12/14
- Re: [O] words starting with call_ confuse C-c C-c and export, Eric Schulte, 2013/12/15
- Re: [O] words starting with call_ confuse C-c C-c and export,
Nicolas Goaziou <=
- Re: [O] words starting with call_ confuse C-c C-c and export, Eric Schulte, 2013/12/16
- Re: [O] words starting with call_ confuse C-c C-c and export, Nicolas Goaziou, 2013/12/16