From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Berry Subject: [bug] [babel] repeated exports w/ inline src blocks yield different results Date: Sun, 24 Nov 2013 04:18:38 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkRA4-0008IL-R9 for emacs-orgmode@gnu.org; Sat, 23 Nov 2013 23:19:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VkR9x-0007FC-Gq for emacs-orgmode@gnu.org; Sat, 23 Nov 2013 23:19:08 -0500 Received: from plane.gmane.org ([80.91.229.3]:45027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkR9x-0007F6-9S for emacs-orgmode@gnu.org; Sat, 23 Nov 2013 23:19:01 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VkR9v-0008Sc-Fy for emacs-orgmode@gnu.org; Sun, 24 Nov 2013 05:18:59 +0100 Received: from 137.110.38.106 ([137.110.38.106]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Nov 2013 05:18:59 +0100 Received: from ccberry by 137.110.38.106 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Nov 2013 05:18:59 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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