Nicolas Goaziou <n.goaz...@gmail.com> writes:

> Hello,
>
> For the record `org-match-substring-regexp' is a variation on:
>
> "\\(\\S-\\)\\([_^]\\)\\(\\(?:\\*\\|[-+]?[^-+*!@#$%^_ 
> \t\r\n,:\"?<>~;./{}=()]+\\)\\)\\)"
>
> I think it is a bit convoluted and therefore difficult to predict.

Luckily this can be made less convoluted:)

> "\\(\\S-\\)\\([_^]\\)\\(\\*\\|[+-]?\\(?:\\w\\|[0-9.,\\]\\)*\\(\\w\\|[0-9]\\)\\)"
>
> That is, without braces, either an asterisk or any combination of word,
> number, dot, comma and backslash characters, which may start with either
> a plus or a minus sign but cannot end with either a dot or a comma.

Should parentheses be recognized? e.g. A₍₁₎ (A_{(1)}) is sometimes
used to denote e.g. a submatrix of A corresponding to the removal of
column 1 in A.  Personally, I would mostly always wrap such stuff into
math anyway (entities being the exception), since I want it in
math-mode anyway.

> What do you think?

This proposal seems better.  Thanks!

Also, it reminded me of this comic:
   http://xkcd.com/1171/

–Rasmus






Reply via email to