From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephan Schmitt Subject: [PATCH] avoid infinite loop in org-babel-execute-buffer Date: Tue, 16 Feb 2010 12:06:45 +0100 Message-ID: <1266318405-15398-1-git-send-email-drmabuse@cs.tu-berlin.de> Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NhLH4-00067p-DG for emacs-orgmode@gnu.org; Tue, 16 Feb 2010 06:07:26 -0500 Received: from [140.186.70.92] (port=36010 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NhLH3-00067U-Jk for emacs-orgmode@gnu.org; Tue, 16 Feb 2010 06:07:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NhLH3-0001CB-1l for emacs-orgmode@gnu.org; Tue, 16 Feb 2010 06:07:25 -0500 Received: from algieba.ni.cs.tu-berlin.de ([130.149.24.75]:40788) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NhLH2-0001C0-Sl for emacs-orgmode@gnu.org; Tue, 16 Feb 2010 06:07:25 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --- contrib/babel/lisp/org-babel.el | 7 ++++--- 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 -- 1.6.4.4