From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Dynerman Subject: Only evaluate code blocks interactively, but export results Date: Sat, 4 Apr 2015 12:03:14 -0500 Message-ID: <0119590B-CC3F-4CAF-85E6-E736C6755AB2@block-party.net> Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_6A6D94CC-FD2F-43DF-B512-AAF15E9D8896"; protocol="application/pgp-signature"; micalg=pgp-sha512 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeRTq-000808-DG for emacs-orgmode@gnu.org; Sat, 04 Apr 2015 13:03:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YeRTm-0002YT-IZ for emacs-orgmode@gnu.org; Sat, 04 Apr 2015 13:03:34 -0400 Received: from block-party.net ([94.254.0.205]:46069 helo=anti-capital.block-party.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeRTm-0002Y6-Cc for emacs-orgmode@gnu.org; Sat, 04 Apr 2015 13:03:30 -0400 Received: from [192.168.1.74] (71-82-217-3.dhcp.mdsn.wi.charter.com [71.82.217.3]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: david@block-party.net) by anti-capital.block-party.net (Postfix) with ESMTPSA id 0938A2326 for ; Sat, 4 Apr 2015 12:03:25 -0500 (CDT) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --Apple-Mail=_6A6D94CC-FD2F-43DF-B512-AAF15E9D8896 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi all, I=E2=80=99m trying to accomplish the following: 1) I have an org-babel python block in my code that produces a figure = file 2) I=E2=80=99d like to include the resulting figure HTML export of my = org file 3) The code takes a bit to run, so I don=E2=80=99t want to execute the = code block during each HTML export What I have so far: #+NAME: my_python_function #+HEADER: :var some python vars #+BEGIN_SRC python :results value file my python code #+END_SRC #+CALL: my_python_function(some python vars=3Dvalues) :results value = file :exports results #+CAPTION: Here is a figure #+LABEL: fig:an_amazing_figure #+ATTR_HTML: :height 200em #+RESULTS: [[file:output_file]] This block works when I export to HTML (e.g. the code runs, and the = figure is placed in the appropriate figure with the appropriate = caption). Question: How can I modify this so that the code is only executed when I = run C-c C-c on the +CALL line, but still have the figure in the exported = HTML? I tried adding :eval no-export to the code and to the +CALL line, but = then the resulting HTML doesn=E2=80=99t contain the figure (it outputs = =E2=80=9Cnil=E2=80=9D, presumably because the CALL line is trying to = call it, but the code is refusing to run because of the no-export line) I=E2=80=99ve been digging around this for a few hours, any help would be = appreciated. Thanks, David --Apple-Mail=_6A6D94CC-FD2F-43DF-B512-AAF15E9D8896 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJVIBlXAAoJEBztEfokJf+KYVEP/1bxr3NyuB7UGG7EdsDNIBIe iDjYcZMw8PPN7VLu/Ovt/86OnYqt+Vc3wKraP9JHPeIng+7rV/ncKFpLbRQTCKf9 Z+evOAINO2CtQdkNRnA9SZ70pZl5k7WYcNmrdaKKYw7lPBK7H8kTWHTB61E92d7B lHTEU+rzynaqIeidG+q7OiwpzGhNx38mnIHYLDeh2WjE/4+wmC+i/gINXqJxYOxu FnBn38urmxDT5mJOpjF7uj19myhhypRy/+M4+PhaVw7fw9L2ghF7doaDNoXWhoTb yT6fJCzyU4rBqE22LLJTrCNVCLrUbKOzz6geko9HSYRazJTMD2fuHXFMsvhOwx92 Ywq33HYLRBdfUb3Frkaq+2NPyTnEcTgP1tHjeA6Whjt0KAETSwxaN5LqGF0OMfwI vtpF4mbt2zZeT/wiESG4NJV2g9scb2Uk5RQbWYGVb4lN9s+2sC7+NbTVthL3Atqk v3SgatNJSV168jNpIfuAQU9rSFaEPWT/x7EHOPB+qRFisEpGonoXkASjtZxSGP9f sucM3f4sGWG0JAsHPmgOzlHacBMrx6UXzO1ftf7GzPXXcdB5QXNm87ieEh8MNL8N 9nLC5p7c3UgngLDWIrXFwsEUgGUrgSFyzylezmRohfVEc3vUkVdK2ODl0FjmBffn 9rbOhkKw5Mr2lJa5DskD =n2ow -----END PGP SIGNATURE----- --Apple-Mail=_6A6D94CC-FD2F-43DF-B512-AAF15E9D8896--