emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Charles C. Berry" <ccberry@ucsd.edu>
To: Ken Mankoff <mankoff@gmail.com>
Cc: emacs-org <emacs-orgmode@gnu.org>
Subject: Re: Bug: org-export-babel-evaluate causes everything to be exported [8.3.4 (release_8.3.4-824-ga02fe8)]
Date: Thu, 19 May 2016 20:33:23 -0700	[thread overview]
Message-ID: <alpine.OSX.2.20.1605192002260.11039@charles-berrys-macbook.local> (raw)
In-Reply-To: <m260u9d1rv.fsf@gmail.com>

On Thu, 19 May 2016, Ken Mankoff wrote:

>
> I've noticed that code and results are all getting exported in the
> latest Org mode git head. This is new  behavior. I haven't traced
> it to what commit caused this change, but the stock 8.2.10 install does
> not have this bug.
>
> The offending setting is:
>
> (setq org-export-babel-evaluate nil)


I think this is a *feature* not a bug.

It turns off all of babel on export. So the code will still be there and 
any results that were already in the buffer will also be there.

You can use `org-babel-remove-result-one-or-many' with a prefix if you 
want results to be stripped (prior to export, say).

You can use :cache to prevent re-evaluation of code blocks and set 
org-export-babel-evaluate to t. Then the `:exports results' blocks will 
not have their code run nor exported.

If you want to avoid babel, but still have header-args govern the 
appearance of the export, you have a lot of work to do. The exporter does 
not get automatic access to the header-args, so stuff like

`#+PROPERTY: header-args :exports results'

would be hard for the src-block transcoder to find.

A workaround that might suffice is to defun `org-export-my-src-block' to 
return nothing, then use it as the src-block transcoder in a derived 
export backend. Then all the code disappears on export.

There are some other possibilities like hacks involving babel. Probably 
better to stay away from those.

HTH,

Chuck

  parent reply	other threads:[~2016-05-20  3:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-20  0:13 Bug: org-export-babel-evaluate causes everything to be exported [8.3.4 (release_8.3.4-824-ga02fe8)] Ken Mankoff
2016-05-20  0:18 ` Ken Mankoff
2016-05-20  3:33 ` Charles C. Berry [this message]
2016-05-20 11:12   ` Ken Mankoff
2016-05-20 11:28     ` Ken Mankoff
2016-05-20 17:29       ` Charles C. Berry
2016-05-20 17:44         ` Ken Mankoff
2016-05-20 17:48           ` Charles C. Berry
2016-05-20 23:03             ` Ken Mankoff

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=alpine.OSX.2.20.1605192002260.11039@charles-berrys-macbook.local \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=mankoff@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).