Преглед на файлове

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 години
родител
ревизия
693cea9bb9
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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)