org-list: Fix infloop when inserting an item
commit5dbccdb432a6cae66f0866a30379a352873ed15e
authorNicolas Goaziou <n.goaziou@gmail.com>
Tue, 13 Nov 2012 14:45:09 +0000 (13 15:45 +0100)
committerNicolas Goaziou <n.goaziou@gmail.com>
Tue, 13 Nov 2012 14:45:09 +0000 (13 15:45 +0100)
tree58469a6bbdd1ce264497a0cbebcb717f1b926c4a
parent2aeb28d2af6050ef9ef5130b28697fdabe8bf04b
org-list: Fix infloop when inserting an item

* lisp/org-list.el (org-list-separating-blank-lines-number): When
  computing number of blank lines separating items, also count those
  in unparsed blocks, like example blocks.
* testing/lisp/test-org-list.el: Add tests.

In the following situation, with `org-blank-before-new-entry' set to
`auto' for `plain-list-item, a blank line should be inserted when
inserting the following item:

- item1
  #+BEGIN_EXAMPLE

  contents

  #+END_EXAMPLE
lisp/org-list.el
testing/lisp/test-org-list.el