From 96ad99ba07f8b07d3596114da230cdda2333d4c6 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Fri, 19 Aug 2011 07:50:11 -0600 Subject: [PATCH] ob: idempotent code block evaluation and result removal * lisp/ob.el (org-babel-remove-result): Idempotent code block evaluation and result removal. --- lisp/ob.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ob.el b/lisp/ob.el index e8c25a821..bd066e07c 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -1678,8 +1678,9 @@ code ---- the results are extracted in the syntax of the source (interactive) (let ((location (org-babel-where-is-src-block-result nil info)) start) (when location + (setq start (- location 1)) (save-excursion - (goto-char location) (setq start (point)) (forward-line 1) + (goto-char location) (forward-line 1) (delete-region start (org-babel-result-end)))))) (defun org-babel-result-end ()