From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Error when recomputing the line of a table Date: Tue, 17 Sep 2013 09:34:01 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLpnY-0004yl-An for emacs-orgmode@gnu.org; Tue, 17 Sep 2013 03:34:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLpnR-0006C5-NL for emacs-orgmode@gnu.org; Tue, 17 Sep 2013 03:34:12 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:23657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLpnR-0006Bk-Gj for emacs-orgmode@gnu.org; Tue, 17 Sep 2013 03:34:05 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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 "#" 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