From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [RFC] Alternative to sub/superscript regexp Date: Mon, 25 Nov 2013 22:53:30 +0100 Message-ID: <87d2lono6d.fsf@gmx.us> References: <87wqjw8kuk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vl43P-0000aH-SG for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 16:50:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vl43J-0006c7-IQ for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 16:50:51 -0500 Received: from plane.gmane.org ([80.91.229.3]:57599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vl43J-0006by-Aw for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 16:50:45 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Vl43H-00020S-N6 for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 22:50:43 +0100 Received: from dynamic-adsl-94-39-217-142.clienti.tiscali.it ([94.39.217.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Nov 2013 22:50:43 +0100 Received: from rasmus by dynamic-adsl-94-39-217-142.clienti.tiscali.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Nov 2013 22:50:43 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nicolas Goaziou 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