From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Richard Subject: Re: Args out of range: #, 0, 1 Date: Tue, 13 Jan 2015 22:58:41 +0100 Message-ID: <87387ejqb2.fsf@yahoo.fr> References: <86iogara9o.fsf@example.com> <874mrulluj.fsf@yahoo.fr> <86r3uyo1ni.fsf@example.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YB9UK-0004Ri-Jp for emacs-orgmode@gnu.org; Tue, 13 Jan 2015 16:59:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YB9UH-00049M-7s for emacs-orgmode@gnu.org; Tue, 13 Jan 2015 16:59:00 -0500 Received: from plane.gmane.org ([80.91.229.3]:43454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YB9UH-00049D-1t for emacs-orgmode@gnu.org; Tue, 13 Jan 2015 16:58:57 -0500 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YB9UF-0006Tq-La for emacs-orgmode@gnu.org; Tue, 13 Jan 2015 22:58:55 +0100 In-Reply-To: <86r3uyo1ni.fsf@example.com> (Sebastien Vauban's message of "Tue, 13 Jan 2015 21:40:01 +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: Sebastien Vauban Cc: public-emacs-orgmode-mXXj517/zsQ@plane.gmane.org, Nicolas Goaziou Sebastien Vauban writes: > This still leaves me with one question: how do we reproduce the problem? > What's the trigger for it? Mostly luck. i.e. you need to have called a function that callled string-match on a string, with a regexp containing (at least) 4 grouping constructs, and the 4th matched at the beginning of that string (beginning position 0) but only one character (end position 1) [1]. And then later call org-babel-demarcate-block. Between the two, many things may have happened as long as the match data was preserved. [1] I gave an example of such a call to string-match -- my example wasn't super useful I admit. In your case, it could be anything : not necessarily an org function. Many functions use string-match internally. > PS- @NicolasG, thanks for fixing it... And also thanks for mentionning org-babel-src-block-regexp... and completely rewriting org-babel-where-is-src-block-head. Very impressive! -- Nicolas.