소스 검색

babel: avoid infinite loop in org-babel-execute-buffer -- Thanks to Stephan Schmitt

Eric Schulte 15 년 전
부모
커밋
753d1402d8
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      contrib/babel/lisp/org-babel.el

+ 4 - 3
contrib/babel/lisp/org-babel.el

@@ -300,9 +300,10 @@ the current buffer."
   (save-excursion
     (goto-char (point-min))
     (while (re-search-forward org-babel-src-block-regexp nil t)
-      (goto-char (match-beginning 0))
-      (org-babel-execute-src-block arg)
-      (goto-char (match-end 0)))))
+      (let ((pos-end (match-end 0)))
+	(goto-char (match-beginning 0))
+	(org-babel-execute-src-block arg)
+	(goto-char pos-end)))))
 
 (defun org-babel-execute-subtree (&optional arg)
   "Call `org-babel-execute-src-block' on every source block in