From cce0cf9682c01c8ff4d36d0bf06df223b7c7cb6e Mon Sep 17 00:00:00 2001 From: Aditya Siram Date: Fri, 13 Sep 2013 09:57:25 -0500 Subject: [PATCH 1/2] org-babel-src-block-regexp ignores empty body org-babel-src-block gobbled up everything until the ending delimiter of the next code block. Fixed this by making the body regexp non-greedy. lisp/ob-core.el | 2 + 1 file changed, 1 insertion(+), 1 deletion(-) --- lisp/ob-core.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index d57806b..e8f16a0 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -188,7 +188,7 @@ This string must include a \"%s\" which will be replaced by the results." ;; (4) header arguments "\\([^\n]*\\)\n" ;; (5) body - "\\([^\000]*?\n\\)?[ \t]*#\\+end_src") + "\\([^\000]*?\n\\)??[ \t]*#\\+end_src") "Regexp used to identify code blocks.") (defvar org-babel-inline-src-block-regexp -- 1.8.1.2