emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] avoid infinite loop in org-babel-execute-buffer
@ 2010-02-16 11:06 Stephan Schmitt
  2010-02-16 20:36 ` Eric Schulte
  0 siblings, 1 reply; 2+ messages in thread
From: Stephan Schmitt @ 2010-02-16 11:06 UTC (permalink / raw)
  To: emacs-orgmode

---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] avoid infinite loop in org-babel-execute-buffer
  2010-02-16 11:06 [PATCH] avoid infinite loop in org-babel-execute-buffer Stephan Schmitt
@ 2010-02-16 20:36 ` Eric Schulte
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2010-02-16 20:36 UTC (permalink / raw)
  To: Stephan Schmitt; +Cc: emacs-orgmode

Applied, Thanks! -- Eric

Stephan Schmitt <drmabuse@cs.tu-berlin.de> writes:

> ---
>  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-17 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-16 11:06 [PATCH] avoid infinite loop in org-babel-execute-buffer Stephan Schmitt
2010-02-16 20:36 ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).