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 21:04:07 +0200 Message-ID: <87wr08b8bc.fsf@med.uni-goettingen.de> References: <87k3w8bq9z.fsf@med.uni-goettingen.de> <87fw6wqr2b.fsf@gmx.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9L48-0002Ww-4V for emacs-orgmode@gnu.org; Wed, 05 Sep 2012 15:15:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9L46-0007Uj-Cd for emacs-orgmode@gnu.org; Wed, 05 Sep 2012 15:15:07 -0400 Received: from plane.gmane.org ([80.91.229.3]:50196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9L46-0007Ss-5L 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 1T9KuQ-0006Wb-Ba for emacs-orgmode@gnu.org; Wed, 05 Sep 2012 21:05:06 +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:05:06 +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:05:06 +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 Eric Schulte writes: > 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 >> >> > > Hi Andreas, > > When doing something this complex you may just want to write your own > function which could say... take a subtree ID and a boolean flag as > arguments and then set the export flag on that subtree as appropriate. > > The org-id-goto and org-toggle-comment functions may help in > implementing this function. > > Best, Hi Eric, in my opinion, there are more complex things in org-mode already ;-) I agree, that such functionality doesn't need to be provided in org itself. Thanks a lot for the pointers to possible entry-points for an implementation. I hope, I'll find time to to go for it. Would be good for my elisp, anyway... Regards, Andreas