From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: Bug: org-export-babel-evaluate causes everything to be exported [8.3.4 (release_8.3.4-824-ga02fe8)] Date: Fri, 20 May 2016 07:12:58 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3iMa-0005ZV-6g for emacs-orgmode@gnu.org; Fri, 20 May 2016 07:13:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3iMX-0000ED-T1 for emacs-orgmode@gnu.org; Fri, 20 May 2016 07:13:03 -0400 Received: from mail-qg0-x229.google.com ([2607:f8b0:400d:c04::229]:32866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3iMX-0000E9-Nm for emacs-orgmode@gnu.org; Fri, 20 May 2016 07:13:01 -0400 Received: by mail-qg0-x229.google.com with SMTP id f92so58230461qgf.0 for ; Fri, 20 May 2016 04:13:01 -0700 (PDT) In-reply-to: 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" To: "Charles C. Berry" Cc: emacs-org On 2016-05-19 at 23:33, Charles C. Berry wrote: > 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. The documentation is: "Switch controlling code evaluation during export. When set to nil no code will be evaluated as part of the export process." which is different than "all code and results will be exported". Evaluation and export are two different things. > 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. (setq org-export-babel-evaluate t) #+BEGIN_SRC octave :exports results :cache nil "hello, world" #+END_SRC #+RESULTS: : hello, world Yes, the above appears to work. Thanks, -k.