Consider this code: ,---- | * test | | #+NAME: block2 | #+BEGIN_SRC emacs-lisp :exports both | (setf not-yet-bound-a t ) | #+END_SRC | | src_emacs-lisp{(+ 1 1)} | | end of buffer | `---- Upon export via
C-c C-e C-b t A y y yields: ,---- | 1 test | ====== | | ,---- | | (setf not-yet-bound-a t ) | `---- | | ,---- | | t | `---- | | `2' | | end of buffer | `---- just as one would hope. But trying it again, C-c C-e C-b t A y y gives ,---- | 1 test | ====== | | ,---- | | (setf not-yet-bound-a t ) | `---- | #+END_SRC | | ,---- | | t | `---- | | `2' | | end of buffer | `---- and you see the extra '#+END_SRC' line. And if you keep repeating those keystrokes, the second result again appears. However, sometimes a minor change and then an erasure (perhaps 'a a C-x u') followed by the export keystrokes yields the correct result. There are some other forms of misbehavior: if I change the header arg in the src block to ":exports results", then the first export is correct, but the second export skips execution of the src block and writes the code in the export as if ':exports code' had been given. But again 'a a C-x u' seems to clear whatever condition causes the misbehavior. Remove the "src_emacs-lisp{...}" and clear with 'a a C-x u' and everything works fine again through multiple exports. I tagged the subject line '[babel]' because of that. Chuck