emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: Michael Brand <michael.ch.brand@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Stack overflow in regexp matcher
Date: Sun, 28 Nov 2010 15:08:26 -0500	[thread overview]
Message-ID: <87d3ppnrd1.fsf@fastmail.fm> (raw)
In-Reply-To: <AANLkTikCds0VC-GyDk7xkqWZ2UHSuN92sEQOSEhigx0R@mail.gmail.com> (Michael Brand's message of "Sat, 20 Nov 2010 17:03:32 +0100")

Michael Brand <michael.ch.brand@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

  reply	other threads:[~2010-11-28 20:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-20 16:03 Stack overflow in regexp matcher Michael Brand
2010-11-28 20:08 ` Matt Lundin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-10-24  6:41 Alan Schmitt
2014-10-24 19:02 ` Charles Berry
2014-10-24 19:51   ` Gregor Zattler
2014-10-25 17:00     ` Charles C. Berry
2014-10-25 18:34       ` Charles C. Berry
2014-11-28 18:33         ` Alan Schmitt
2014-10-26 11:11       ` Alan Schmitt
2014-10-25  9:24   ` Alan Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d3ppnrd1.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=michael.ch.brand@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).