Bladeren bron

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 jaren geleden
bovenliggende
commit
689b51224f
1 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  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))))))