Hello, "Eric Schulte" writes: >> The real problem is: how should Org react when parsing syntactically >> erroneous buffers? I concede that freezing Emacs isn't nice, but otoh, >> code can't deal with every possible user error. >> >> So, what is the expected behavior here? Consider orphan #+end_ as >> normal text, throw an error, or both? An answer to this question would >> be more useful than code, honestly. >> > > This is just opinion and gut reaction, but my first instinct is to say > that Org just treat an orphan #+end_ as normal text (or technically as > an Org-mode comment). > > The same is true for a floating #+begin_src. Until the block is closed, > it is just a comment. As it's the only answer so far, I guess it was more trivial than I thought. Here is a patch that should fix the original problem. Martyn, as you are writing tests, would you mind running it against them, before I apply it? Many thanks in advance. Regards,