[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Error when recomputing the line of a table

From: Alan Schmitt
Subject: [O] Error when recomputing the line of a table
Date: Tue, 17 Sep 2013 09:34:01 +0200
User-agent: mu4e; emacs 24.3.1


I have a problem when recomputing the last line of a table. If I hit
"C-c *", I get the following (in the debugger):

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("^ *" nil)
  call-interactively(org-ctrl-c-star nil nil)
--8<---------------cut here---------------end--------------->8---

What is really strange is that if I copy the file to another location on
the disk and try to recompute the line, I don't get this error, so it's
quite difficult to provide a minimal example with the problem.

I looked at a little at the code, and the problem comes from here:

--8<---------------cut here---------------start------------->8---
    ;; Get the rows
    (setq lines (org-split-string
                 (buffer-substring beg end) "\n"))
    ;; Store the indentation of the first line
    (if (string-match "^ *" (car lines))
--8<---------------cut here---------------end--------------->8---

for some reason `lines' is nil, which causes the problem. The table is
far from empty (it has more than 500 lines).

I tried to get a little more information from the backtrace evaluating
expressions, and it seems that `beg' is bound to 42, and `end' to
"#<marker at 42 in suivi PW-runx.org>"

One strange thing is that position 42 is not in the table at all, it's
in a code block right before it (42 is right before the reset). This is
what the beginning of my file looks like:

--8<---------------cut here---------------start------------->8---
#+begin_src gnuplot :var data=data-table

set title "PW"
set size ratio square

set xlabel "Date"
set xdata time
set timefmt "%Y-%m-%d"
set format x "%Y-%m"
set xtics nomirror

plot data using 1:4 with lines axis x1y1 title 'Week',
     data using 1:5 with lines axis x1y1 title 'Month'

#+tblname: data-table
| Date             |   Q |  Cumul | 7 days | 30 days | Global |
| [2012-03-19 Mon] |   0 |      0 |     NA |      NA |   0.00 |
| [2012-03-20 Tue] |   4 |      4 |     NA |      NA |   2.00 |
| [2012-03-21 Wed] |   8 |     12 |     NA |      NA |   4.00 |
| [2012-03-22 Thu] |   7 |     19 |     NA |      NA |   4.75 |
--8<---------------cut here---------------end--------------->8---

I'd gladly provide more information, but I don't really know how to do
it. (Of course, if I debug "org-table-begin", everything works as

Any suggestion as how to try to track this down?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]