org-element: Fix `org-element-at-point' at end of buffer
commit41cf6f2a3687a6edeccb9171e056d2017b17f7df
authorNicolas Goaziou <n.goaziou@gmail.com>
Wed, 18 Sep 2013 19:15:04 +0000 (18 21:15 +0200)
committerNicolas Goaziou <n.goaziou@gmail.com>
Wed, 18 Sep 2013 19:15:04 +0000 (18 21:15 +0200)
treea7a14a351e1f3c7308a475a7a7b8c57f1be9afdb
parent072f2abe4cdb57d01262e28858330f1e22de5e6f
org-element: Fix `org-element-at-point' at end of buffer

* lisp/org-element.el (org-element-at-point): If point is at the end
  of the buffer, and that buffer ends with a list, and there's no
  final newline, return last element in last item instead of plain
  list.
* testing/lisp/test-org-element.el: Add test.

This fix allows to fill correctly the following construct:

 - Item with a very long line ending at the end of buffer.
lisp/org-element.el
testing/lisp/test-org-element.el