emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Nicolas Girard <girard.nicolas@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: [Babel] org-babel-execute-buffer gives different results than org-babel-exp-non-block-elements
Date: Fri, 23 Aug 2013 01:06:44 +0200	[thread overview]
Message-ID: <87siy1jpff.fsf@gmail.com> (raw)
In-Reply-To: <CANMKmeeQ_y3hFm8MVW2u287FiKGQm8rkFSaYDifZLt8TGVtreg@mail.gmail.com> (Nicolas Girard's message of "Thu, 22 Aug 2013 23:01:45 +0200")

Nicolas Girard <girard.nicolas@gmail.com> writes:

> I'm ashamed... but this time I swear I started a minimal emacs session
> and got it to work. The instructions have slightly changed and are
> written at the very beginning of the attached minimal document.

I see.

There is an important difference between evaluating a buffer and
evaluating a buffer during export. In the latter, Babel has to deal with
replacement values, i.e., code block is replaced by its results. See the
difference between `org-export-execute-babel-code' and
`org-babel-execute-buffer' in a buffer containing only

  src_emacs-lisp[:results raw]{(+ 1 2)}

In this case, your code removes the code (and much more) as
a side-effect. This confuses `org-babel-exp-non-block-elements', which
also tries to remove it. As this fails, it removes a random part of the
buffer instead (probably as a mean revenge).

`org-babel-exp-non-block-elements' and `org-babel-exp-process-buffer'
could probably check if code still exists before trying to remove (and
replace) it.


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2013-08-22 23:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22 18:23 [Babel] org-babel-execute-buffer gives different results than org-babel-exp-non-block-elements Nicolas Girard
2013-08-22 18:41 ` Nicolas Goaziou
2013-08-22 19:28   ` Nicolas Girard
2013-08-22 20:28     ` Nicolas Girard
2013-08-22 20:33       ` Nicolas Goaziou
2013-08-22 21:01         ` Nicolas Girard
2013-08-22 23:06           ` Nicolas Goaziou [this message]
2013-08-22 23:20             ` Nicolas Girard
2013-08-23  8:11               ` Nicolas Goaziou
2013-08-23 14:55                 ` Eric Schulte
2013-08-26 10:33                   ` 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=87siy1jpff.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=girard.nicolas@gmail.com \
    /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).