Bläddra i källkod

ob.el fixed bug when inserting into empty buffer

* lisp/ob.el (org-babel-insert-result): ensures `beg' is set, even if
  no previous result exists
Eric Schulte 14 år sedan
förälder
incheckning
693cea9bb9
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      lisp/ob.el

+ 2 - 1
lisp/ob.el

@@ -1187,7 +1187,8 @@ code ---- the results are extracted in the syntax of the source
 	      (results-switches
                (cdr (assoc :results_switches (nth 2 info))))
 	      beg end)
-	  (when existing-result
+	  (if (not existing-result)
+	      (setq beg (point))
 	    (goto-char existing-result)
 	    (save-excursion
 	      (re-search-forward "#" nil t)