emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Charles Berry <ccberry@ucsd.edu>
To: emacs-orgmode@gnu.org
Subject: [bug] [babel] repeated exports w/ inline src blocks yield different results
Date: Sun, 24 Nov 2013 04:18:38 +0000 (UTC)	[thread overview]
Message-ID: <loom.20131124T044020-399@post.gmane.org> (raw)


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

             reply	other threads:[~2013-11-24  4:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-24  4:18 Charles Berry [this message]
2013-11-27  2:27 ` [bug] [babel] repeated exports w/ inline src blocks yield different results Yasushi SHOJI
2013-11-28 21:31   ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20131124T044020-399@post.gmane.org \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).