From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: conditional export based on babel result Date: Wed, 05 Sep 2012 06:09:52 -1000 Message-ID: References: <87k3w8bq9z.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9IB4-0002uw-0H for emacs-orgmode@gnu.org; Wed, 05 Sep 2012 12:10:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9IAz-00060s-G7 for emacs-orgmode@gnu.org; Wed, 05 Sep 2012 12:10:05 -0400 Received: from oproxy12-pub.bluehost.com ([50.87.16.10]:40202) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1T9IAz-00060E-4p for emacs-orgmode@gnu.org; Wed, 05 Sep 2012 12:10:01 -0400 In-Reply-To: <87k3w8bq9z.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Wed, 05 Sep 2012 14:36:08 +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: Andreas Leha Cc: emacs-orgmode@gnu.org Hi Andreas, Perhaps you could generate the conditional parts of the document from source code blocks? Pass in your test result and either export "" or #+begin_latex ... #+end_latex? All the best, Tom Andreas Leha writes: > Hi all, > > is there a possibility to exclude (or include) parts of the document > based on some babel source block result? > > First some use case: > Say, I am doing a statistical test. And only if the test turns out to be > significant, a follow-up analysis is carried out. > > Is that possible? > > One thinkable and ugly option would be to allow lisp-generated tags like > in this dummy example: > > #+begin_org > > * The Test > #+name: sometest > #+begin_src R > test_result <- 0.03 > #+end_src > > > ** export maybe (if (< (string-to-number (sbe sometest)) 0.05) > ":export:" ":noexport:") > The follow-up > > #+end_org > > > Regards, > Andreas > > > -- Thomas S. Dye http://www.tsdye.com