浏览代码

ob: idempotent code block evaluation and result removal

* lisp/ob.el (org-babel-remove-result): Idempotent code block
  evaluation and result removal.
Eric Schulte 13 年之前
父节点
当前提交
96ad99ba07
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lisp/ob.el

+ 2 - 1
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 ()