ob-core: Fix results removal without blank line between source and results
commit1d8126385cf979cfaade0e6a82040884bd6af56b
authorNicolas Goaziou <mail@nicolasgoaziou.fr>
Sat, 25 Nov 2017 20:07:52 +0000 (25 21:07 +0100)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Sat, 25 Nov 2017 20:07:52 +0000 (25 21:07 +0100)
treea98202b89ef1514c24a8de6be85301606d70c9fa
parented06b159c328d6b7781527725a49b8833ed18bfc
ob-core: Fix results removal without blank line between source and results

* lisp/ob-core.el (org-babel-remove-result): Delete blank lines before
  results.
(org-babel-result-end): Use `org-element-at-point'.
* testing/lisp/test-ob.el (test-ob-verify-result-and-removed-result):
  Remove duplicate.
* testing/lisp/test-ob.el (test-ob/org-babel-remove-result--no-blank-line):
  New test.
* testing/lisp/test-ob.el (test-ob/results-in-narrowed-buffer): Small
  refactoring.

Reported-by: Ken Mankoff <mankoff@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-11/msg00338.html>
lisp/ob-core.el
testing/lisp/test-ob.el