From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Stack overflow in regexp matcher Date: Sun, 28 Nov 2010 15:08:26 -0500 Message-ID: <87d3ppnrd1.fsf@fastmail.fm> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=55208 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMnXx-0008H7-7b for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 15:08:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PMnXv-0005Rn-VB for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 15:08:29 -0500 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:43968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PMnXv-0005Ri-Sk for emacs-orgmode@gnu.org; Sun, 28 Nov 2010 15:08:27 -0500 In-Reply-To: (Michael Brand's message of "Sat, 20 Nov 2010 17:03:32 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Michael Brand Cc: Org Mode Michael Brand writes: > Here is an issue for the quite common work flow of copy pasting some > table columns in a whole from a spreadsheet application into Org > table. For this situation I suggest to provide a better user > information than only the current error message "Stack overflow in > regexp matcher". Reproduce like this: > > in a spreadsheet application like OpenOffice.org Calc or Excel: > - create a 1x2 table with two columns A and B > - fill out the fields A1 and B1 with some simple content > - select the columns A and B and copy to clipboard > > in a new Org buffer: > - paste from clipboard > - select the line with A1 and B1 > - convert the selection to Org table: C-c | > - change A1 to the assignment `=1' > - try to update Org table: C-c C-c > > This will produce the above mentioned error message. The reason are > the 65535 lines with a TAB following the Org table that have been > copied when selecting the two first columns A and B in the spreadsheet > application. It can be quite annoying to find this out with only the > current error message and with TABs not made visible so I thought it > would be helpful to point this out in the hope of someone finding a > better user guidance. I'd like to provide a patch by myself but in > this case I don't understand more than to find out that the many TABs > are the problem and have to be removed or to be not copied. > I can reproduce this with OpenOffice. Here's the backtrace: Debugger entered--Lisp error: (error "Stack overflow in regexp matcher") looking-at("\\([ ]*\n\\)*[ ]*#\\+TBLFM: *\\(.*\\)") org-table-get-stored-formulas() org-table-get-formula(#("1" 0 1 (face org-formula fontified t)) nil) org-table-eval-formula(nil #("1" 0 1 (face org-formula fontified t))) org-table-maybe-eval-formula() org-ctrl-c-ctrl-c(nil) call-interactively(org-ctrl-c-ctrl-c nil nil) Best, Matt