Hi Babel I've been working on an exporter and have come across some strange behaviour regarding 'empty' source blocks with regard to tangling. If an attempt is made to tangle a block containing two blank (no white-space) lines, the block is exported as carriage returns (as I would expect). If a block contains one or no blank lines, the #+end_src tag appears to be consumed by the block (along with subsequent text upto the next #+end_src tag). I tracked this down to the org-babel-src-block-regexp variable in ob.el and have modified it to give what appears to be consistent behaviour. I also found the following unresolved bug report which may be related... http://www.mail-archive.com/emacs-orgmode@gnu.org/msg29992.html I've included a simple test file, and resultant tangled files before and after the patch to attempt to convey the problem. NOTE: Since the patch itself modifies a defvar, and since I'm not clear on how a patched defvar should be updated downstream, the patch includes a setq statement to update the defvar org-babel-src-block-regexp for test purposes. The patch cannot therefore be applied as is.