From mboxrd@z Thu Jan 1 00:00:00 1970 From: Max Linke Subject: Literate programming in org Date: Wed, 26 Aug 2015 10:35:16 +0200 Message-ID: <55DD7A44.2030006@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUWB2-0004EQ-6Y for emacs-orgmode@gnu.org; Wed, 26 Aug 2015 04:35:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUWAx-0004wX-7L for emacs-orgmode@gnu.org; Wed, 26 Aug 2015 04:35:24 -0400 Received: from mout.gmx.net ([212.227.17.20]:61279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUWAx-0004vD-1R for emacs-orgmode@gnu.org; Wed, 26 Aug 2015 04:35:19 -0400 Received: from [10.187.1.16] ([194.95.30.129]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MSHax-1ZJgGk1Cod-00TU0C for ; Wed, 26 Aug 2015 10:35:17 +0200 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: Org Mode Hi I'm currently trying to use org-modes literate programming capabilities to write up a paper. So far it has been a joy to have the plotting code and text in the same document. Thanks for all the work people here have already put in to make this so easy. I have run into a two small problems so far * How can I use computed variables (string/int/float) in floating text? I have for example calculated a autocorrelation time and now want to use that calculated number in the text. The best solution I have found so far is #+name: print_acf_time #+begin_src ipython :session :exports none print(acf_time) #+end_src The autocorrelation time for the process is call_print_acf_time(). That is OK-ish but I have to write a special code cell for every variable that I want to reference in my document. Is there another method to export variables to be easily accessible in org-mode? * reruning specific cells only one time after emacs was started I have some cells that are long running and produce some variables I later use for plotting or calculating related values. To avoid recalculating I have added `cache: yes` to these cells. But they are only run once across restarts of emacs or my interpreter session in the background. When I start working again I would like to have a way to rerun all code-cells independent of the fact if they are cached or not. This would lead to a huge speed up in converting to latex for me. I appreciate any help with this. best Max