From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: exporting documents w/ babel results w/o evaluating babel blocks Date: Fri, 20 May 2016 12:23:09 -0500 Message-ID: References: <878addc2b6b14ce99e907921f0985d24@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87a8jkoec6.fsf@ucl.ac.uk> <87wpmomz6x.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3o8k-0004MB-Tr for emacs-orgmode@gnu.org; Fri, 20 May 2016 13:23:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3o8j-0001Tu-VE for emacs-orgmode@gnu.org; Fri, 20 May 2016 13:23:10 -0400 Received: from mail-vk0-x22a.google.com ([2607:f8b0:400c:c05::22a]:34712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3o8j-0001Ti-Qm for emacs-orgmode@gnu.org; Fri, 20 May 2016 13:23:09 -0400 Received: by mail-vk0-x22a.google.com with SMTP id c189so152169906vkb.1 for ; Fri, 20 May 2016 10:23:09 -0700 (PDT) In-Reply-To: <87wpmomz6x.fsf@ucl.ac.uk> 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: Eric S Fraga , Ken Mankoff , John Hendy , "emacs-orgmode@gnu.org" On Fri, May 20, 2016 at 12:11 PM, Eric S Fraga wrote: > On Friday, 20 May 2016 at 17:06, Ken Mankoff wrote: > > [...] > >> Thanks for clarifying your workflow. That seems to work for a small >> example. But what would you do if you had a manuscript with 100 code >> blocks in it? And in general you're exporting it a lot without >> changing anything in code, just editing the non-code text. But >> occasionally you want to modify a code block (and its results) too? > > So, if I understand correctly, you have org-export-babel-evaluate set to > nil? If I set that, I no longer get asked whether I want anything > evaluated but the (existing) results do get exported. I just tried it > to confirm. Using this block, #+begin_src R :exports results print("hello") #+end_src I get the following (with *no* pre-existing #+results block manually created with C-c C-c): | *o-e-b-e* | *o-c-b-e* | *buffer* | *doc* | |-----------+-----------+-----------+------------------| | nil | t | nothing | =print("hello")= | | t | t | nothing | =hello= | | t | nil | nothing | =hello= | | nil | nil | nothing | =print("hello")= | |-----------+-----------+-----------+------------------| Variables org-export-babel-evaluate and org-confirm-babel-evaluate abbreviated above. I find two things bizarre: - these options (well, just o-e-b-e it seems) would change what's exported? - why without C-c C-c which initiates the #+results block, exporting which causes babel to execute code doesn't insert the results block. Is this intended or for a reason? I've not really looked into these variables and just use :eval yes/no to toggle things. I find it easy enough to create all my blocks with :eval no, and do a quick change to =yes= as I'm iteratively exporting. Finally, I can do a replace-string to catch any missed :eval yes's before a final export. > >> In the above scenario, I used to edit the code, and =C-c C-c= it >> manually to get the updates into the results. When I exported the >> document (C-e l l), it would export in ~1 second (even a >100 page >> document) and not prompt me about executing code blocks. > > Yes, I do this as well in such a case. > > -- > : Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-775-g3308a5