Michael Brand <michael.ch.br...@gmail.com> 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

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to