summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2010-06-07 11:51:30 -0700
committerEric Schulte <schulte.eric@gmail.com>2010-06-07 11:52:04 -0700
commitdc2baab09c415a770b8cc71cb16b34479e0f5afc (patch)
treef5a3487aa3f05c54d8fc31eadf34bf708d3e1df7
parentee94addaace24b83ed5a244327c7f3cbabdcbd7c (diff)
downloadorg-mode-dc2baab09c415a770b8cc71cb16b34479e0f5afc.tar.gz
babel: protecting restrictions on `org-babel-execute-subtree'
-rw-r--r--contrib/babel/lisp/org-babel.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/babel/lisp/org-babel.el b/contrib/babel/lisp/org-babel.el
index 8a16cb8..d5ac8bf9 100644
--- a/contrib/babel/lisp/org-babel.el
+++ b/contrib/babel/lisp/org-babel.el
@@ -384,10 +384,11 @@ the current buffer."
"Call `org-babel-execute-src-block' on every source block in
the current subtree."
(interactive "P")
- (save-excursion
- (org-narrow-to-subtree)
- (org-babel-execute-buffer)
- (widen)))
+ (save-restriction
+ (save-excursion
+ (org-narrow-to-subtree)
+ (org-babel-execute-buffer)
+ (widen))))
(defun org-babel-get-src-block-info (&optional header-vars-only)
"Get information of the current source block.