* Error when recomputing the line of a table
@ 2013-09-17 7:34 Alan Schmitt
0 siblings, 0 replies; only message in thread
From: Alan Schmitt @ 2013-09-17 7:34 UTC (permalink / raw)
To: Org Mode Mailing List
Hello,
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)
org-table-align()
org-table-recalculate(nil)
call-interactively(org-table-recalculate)
org-ctrl-c-star()
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
reset
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'
#+end_src
#+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
expected.)
Any suggestion as how to try to track this down?
Thanks,
Alan
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-09-17 7:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-17 7:34 Error when recomputing the line of a table Alan Schmitt
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.