From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Pank Roulund Subject: Re: Best practices for literate programming [was: Latex export of tables] Date: Sun, 21 Apr 2013 19:25:54 +0200 Message-ID: <87vc7fpzh9.fsf@pank.eu> References: <20130412080600.GA18235@panahar> <20130414232953.GC11696@kuru.dyndns-at-home.com> <20130416115619.GA12405@panahar> <20130416173948.GC7402@kuru.dyndns-at-home.com> <20130416221022.GA7809@panahar> <877gjzsrtt.fsf@pank.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTy1c-0007WX-Q2 for emacs-orgmode@gnu.org; Sun, 21 Apr 2013 13:26:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UTy1Z-0004Z7-UM for emacs-orgmode@gnu.org; Sun, 21 Apr 2013 13:26:04 -0400 Received: from mout.gmx.net ([212.227.17.20]:62052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTy1Z-0004Yq-LA for emacs-orgmode@gnu.org; Sun, 21 Apr 2013 13:26:01 -0400 Received: from mailout-eu.gmx.com ([10.1.101.215]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0M2rdY-1UlEI511uw-00sh5K for ; Sun, 21 Apr 2013 19:25:59 +0200 In-Reply-To: (Thomas S. Dye's message of "Thu, 18 Apr 2013 09:42:38 -1000") 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: "Thomas S. Dye" Cc: emacs-orgmode@gnu.org Dear Tom, > I suppose this depends on what is meant by "reproducible." > > My goal is to produce a compendium as defined by Gentleman and Lang > (see Gentleman R, Lang DT (2004). "Statistical Analyses and Reproducible > Research." Technical report, Bioconductor Project. URL > http://www.bepress.com/bioconductor/paper2).=20=20 > > I keep the init.el file as a babel source block with the reproducible > document, so it can be tangled. I also have an editing setup in a babel > source block that activates many of the same features handled by the > init.el file, but also configures the new exporter to look for init.el > (which might have a different name). The filters are all part of the Org > document, too, and get pulled into the init.el file with noweb > references. My issue here is that this approach might lead to copy-paste "preambles" which may or may not be desirable. I can certainly see the attraction in being able to just tangle the setup. In fact for my thesis I also had a preamble.tex blog in my file. Your proposed setup here is perhaps better in that it uses emacs-lisp. Still, say I'm working on two files A and B. If I fix a bug in "preamble" A I would have to manually copy it over to B.=20=20 Thus, the main question is how to distribute updates? I guess one could keep a separate file, but then we are back at square one in a way. . . One possibility might be a file structure like this setup.org A/project-A.org A/setup-A.org B/project-B.org B/setup-B.org where A and B both has a block like #+BEGIN_SRC org * Preamlbe :noexport: #+INCLUDE: "../setup.org" #+INCLUDE: "setup-A.org" #+END_SRC To ship it off one would only have to write a command to replacing #+INCLUDE with its content. The exporter could likely be used for this and one could produce an archive version when signing off a project. Even more robust, #+INCLUDE: would look for files in org-directory (it might already do, I didn't check). Am I missing something obvious (probably?) in the above stream of random thoughts? It's kind of a LaTeX-ish way of dealing with it, I guess. > I am able to distribute the compendium, typically as a single > document (sometimes with associated data files produced by an > on-line service that can't be used programmatically), which I > believe is a good step toward reproducibility. Agreed. =E2=80=93Rasmus --=20 Send from my Emacs