summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2010-02-16 13:34:09 -0700
committerEric Schulte <schulte.eric@gmail.com>2010-02-16 13:34:09 -0700
commit753d1402d8fb273027159a619f674eb1306ff30c (patch)
tree63b6b77e680faa6f4f69e5f803728d6e6cf91f24
parent574f1b590e7d73ae708b4aea7d925c5669b567b2 (diff)
downloadorg-mode-753d1402d8fb273027159a619f674eb1306ff30c.tar.gz
babel: avoid infinite loop in org-babel-execute-buffer -- Thanks to Stephan Schmitt
-rw-r--r--contrib/babel/lisp/org-babel.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/babel/lisp/org-babel.el b/contrib/babel/lisp/org-babel.el
index 01b730d..7fe4302 100644
--- a/contrib/babel/lisp/org-babel.el
+++ b/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