fix infinite loop in csv table import
commit08a7f6a6dfaea6b16b290026a997c4b79a455ae5
authorEric Schulte <schulte.eric@gmail.com>
Tue, 20 Jul 2010 01:53:30 +0000 (20 01:53 +0000)
committerCarsten Dominik <carsten.dominik@gmail.com>
Tue, 20 Jul 2010 07:28:22 +0000 (20 09:28 +0200)
treef8626db77152e3120f36d8b5f747d4ace39d7a0c
parentaf9d3d119219b3e71850b63e44cb1c26cea5dfd1
fix infinite loop in csv table import

* lisp/org-table.el (org-table-convert-region): don't continue csv
importation which the point catches the end, this fixes an infinite
loop which was caused by the (point) never catching up with the
"end" marker

Hi,

I've just noticed that I get an infinite loop when importing csv tables
into Org-mode tables.  For example calling

  (org-table-convert-region (point-min) (point-max) '(4))

from inside of a simple text file containing the following

--8<---------------cut here---------------start------------->8---
1,2,3
1
2
3
5
--8<---------------cut here---------------end--------------->8---

results in an infinite loop.  The attached patch fixes this issue [1],
however it seems weird that this would just surface now, given that the
code in question has been in the repo since last fall

,----
| commit 59c9c4cdd4ae974dfb92ab441462b3fee48ab5af
| Author: Carsten Dominik <carsten.dominik@gmail.com>
| Date:   Mon Oct 26 12:31:16 2009 +0100
|
|     Correctly interpret CVS tables with quoted fields
|
|     The csv parser was very primitive, ignoring quoted fields.  This is
|     now fixed.
`----

Has anyone else noticed this problem? Should I go ahead and apply this
patch?

Best -- Eric

Footnotes:
[1]

>From 3c3f4ca9a34dca23051ca2f4e4518b416338d4f4 Mon Sep 17 00:00:00 2001
From: Eric Schulte <schulte.eric@gmail.com>
Date: Mon, 19 Jul 2010 13:45:25 -0700
Subject: [PATCH] org-table: fix infinite loop in table importation

* lisp/org-table.el (org-table-convert-region): don't continue csv
  importation which the point catches the end, this fixes an infinite
  loop which was caused by the (point) never catching up with the
  "end" marker
lisp/org-table.el