From 3b535fa389518b7d7c280952990bc56ddbe01206 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Thu, 31 Aug 2017 02:39:54 +0800 Subject: [PATCH] ob-core.el: Fix "No surrounding element" error * ob-core.el (org-babel-execute-buffer): Show all outlines before execution. Without this, when outlines are hidden, executing (org-babel-execute-buffer) gives "No surrounding element" error. TINYCHANGE --- lisp/ob-core.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index d25908d41..a69d4a66b 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -1197,6 +1197,7 @@ the current buffer." (interactive "P") (org-babel-eval-wipe-error-buffer) (org-save-outline-visibility t + (outline-show-all) (org-babel-map-executables nil (if (memq (org-element-type (org-element-context)) '(babel-call inline-babel-call)) -- 2.14.1