From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: conditional export based on babel result Date: Wed, 05 Sep 2012 20:57:24 +0200 Message-ID: <871uigcn6z.fsf@med.uni-goettingen.de> 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]:57178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9L4A-0002YZ-Il for emacs-orgmode@gnu.org; Wed, 05 Sep 2012 15:15:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9L46-0007Uo-C1 for emacs-orgmode@gnu.org; Wed, 05 Sep 2012 15:15:10 -0400 Received: from plane.gmane.org ([80.91.229.3]:50197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9L46-0007TA-5a for emacs-orgmode@gnu.org; Wed, 05 Sep 2012 15:15:06 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T9KpX-0000xp-9z for emacs-orgmode@gnu.org; Wed, 05 Sep 2012 21:00:03 +0200 Received: from vpn-2105.gwdg.de ([134.76.2.105]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Sep 2012 21:00:03 +0200 Received: from andreas.leha by vpn-2105.gwdg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Sep 2012 21:00:03 +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: emacs-orgmode@gnu.org tsd@tsdye.com (Thomas S. Dye) writes: > 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? > Hi Tom, thanks for the suggestion. I have indeed done that already but I will avoid such things in the future. It (a) feels wrong and (b) is ugly code when I write (parts of) my document using print() and cat() functions. Regards, Andreas > > 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 >> >> >>