Browse Source

babel: make sure that source-code blocks don't consume their neighbors

* contrib/babel/lisp/org-babel.el (org-babel-where-is-src-block-result):
  on result insertion, ensure that code blocks don't overrun
  subsequent lines or source blocks
Eric Schulte 15 years ago
parent
commit
689b51224f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      contrib/babel/lisp/org-babel.el

+ 2 - 1
contrib/babel/lisp/org-babel.el

@@ -887,7 +887,8 @@ following the source block."
 				     "#+results"
 				     (when hash (concat "["hash"]"))
 				     ":"
-				     (when name (concat " " name)) "\n"))
+				     (when name (concat " " name)) "\n\n"))
+			    (backward-char)
                             (beginning-of-line 0)
                             (if hash (org-babel-hide-hash)) t)))
                (point))))))