Some tests: Case 1: Start with emacs -Q I insert " #+begin_src javascript #+end_src " with point before "#+end_src", I press " C-c ' " to start editing the source I enter "foobar" into the source buffer and immediately exit with " C-c ' " Case 2: restart with " #+begin_src javascript #+end_src " I've included a patch that fixes both issues. -- Le