Reposting my reply to the emacs-devel thread here as well. The hack I mention that has performance issues was derived from John's solution for the <> issue (though the performance issues are all of my own creation). Best, Tom
This is a known issue with org babel blocks. It is due to the fact that org babel translates the font locking for the language but not the syntax propertization. Another frequent cause is the bash case statement. The end result is that unmatched parens leak out from the babel blocks and wreak havoc elsewhere in the org file unless you balance out the parens e.g. in a comment. I have a hacked fix for this, but it has horrible performance, especially with line numbers enabled. I think that a proper solution would run arbitrary syntax propertization on subsets of a buffer without having to continually check where those subsets start or end.