From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Running babel blocks in :noexport: sections Date: Sat, 27 Oct 2012 16:57:36 -0600 Message-ID: <87mwz7r09r.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:41495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSFKK-0000oD-LU for emacs-orgmode@gnu.org; Sat, 27 Oct 2012 18:58:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSFKJ-0002wv-Dq for emacs-orgmode@gnu.org; Sat, 27 Oct 2012 18:58:00 -0400 Received: from mail-ia0-f169.google.com ([209.85.210.169]:61276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSFKJ-0002wo-82 for emacs-orgmode@gnu.org; Sat, 27 Oct 2012 18:57:59 -0400 Received: by mail-ia0-f169.google.com with SMTP id h37so3787462iak.0 for ; Sat, 27 Oct 2012 15:57:58 -0700 (PDT) In-Reply-To: (John Hendy's message of "Sat, 27 Oct 2012 14:03:20 -0500") 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: John Hendy Cc: emacs-orgmode --=-=-= Content-Type: text/plain John Hendy writes: > For papers and beamer presentations, I sometimes hide more "universal" > babel blocks inside a sort of setup headline. I thought I'd done this > before, but perhaps not... The idea would be like so: > > * Data setup :noexport: > > #+begin_src R :session r > > load libraries > read data files > do universal operations > > #+end_src > > * Slide > > #+begin_src R :session r :exports results :results output graphics > > subset(larger_data_set_from_above) > processing > plot something > > #+end_src > > I noticed today that my :noexport: setup sections (I had a couple) > were not updating. I re-defined a variable name further down in my > file and it was re-using the definition from an above setup section > (tagged with :noexport:). Just because I don't want it export doesn't > mean I don't want to have useful stuff in the headline... > > Is this a bug/inappropriate setting, desirable based on how others use > :noexport: headlines, or would others see value in executing babel > blocks in :noexport: headlines? > > If I /didn't/ want it executed, I'd use :execute no. > > > Thanks for any input, > John > Instead of tagging the headline as :noexport: you can add the COMMENT flag to it. This should result in your desired behavior. See the attached example. --=-=-= Content-Type: text/x-org Content-Disposition: inline; filename=commented-headline.org #+Title: example * COMMENT not exported but run #+name: the-date #+begin_src sh date #+end_src * exported and able to call into un-exported subtrees The date today is, #+call: the-date() --=-=-= Content-Type: text/plain -- Eric Schulte http://cs.unm.edu/~eschulte --=-=-=--